Skip to content

Commit

Permalink
add lsd (#7)
Browse files Browse the repository at this point in the history
* add lsd

* fix insatll lsd in ubuntu
  • Loading branch information
long-910 authored Jan 15, 2024
1 parent 8a56858 commit bb75ca1
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 19 deletions.
2 changes: 2 additions & 0 deletions Doc/zsh.md
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
# zsh

- [lsd](https://github.com/lsd-rs/lsd)
24 changes: 6 additions & 18 deletions dotfiles/.zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,13 @@ bindkey '^R' history-incremental-pattern-search-backward

########################################
# エイリアス
alias la='ls -a'
alias ls='lsd'
alias l='ls -l'
alias ll='ls -l'
alias la='ls -a'
alias lla='ls -la'
alias lt='ls --tree'
alias llt='ll --tree'
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'
Expand Down Expand Up @@ -146,23 +151,7 @@ elif which putclip >/dev/null 2>&1 ; then
alias -g C='| putclip'
fi

#alias emacs='/Applications/Emacs.app/Contents/MacOS/Emacs -nw'

########################################
# OS 別の設定
case ${OSTYPE} in
darwin*)
#Mac用の設定
export CLICOLOR=1
alias ls='ls -G -F'
;;
linux*)
#Linux用の設定
;;
esac

# vim:set ft=zsh:

# tmuxを自動起動する
if [ -z "$TMUX" -a -z "$STY" ]; then
if type tmuxx >/dev/null 2>&1; then
Expand All @@ -177,4 +166,3 @@ if [ -z "$TMUX" -a -z "$STY" ]; then
screen -rx || screen -D -RR
fi
fi

12 changes: 11 additions & 1 deletion install_and_configure.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,11 @@ check_and_install() {
if [[ "$package_manager" == "brew" ]]; then
brew install "$package_name"
else
sudo $package_manager install -y "$package_name"
if ! sudo $package_manager install -y "$package_name"
then
echo "Failed to install $package_name using $package_manager."
sudo snap install "$package_name"
fi
fi
exit_on_error $? "Failed to install $package_name."
installed_version=$($package_name --version)
Expand All @@ -90,9 +94,15 @@ get_and_apply_config() {
echo "$package_name configuration applied successfully: ${HOME}/${config_file}"
}

# lsd
check_and_install "lsd"
echo -e

# Zshのインストールと設定ファイルの取得・適用
check_and_install "zsh"
get_and_apply_config "Zsh" ".zshrc"
# shellcheck source=/dev/null
source "${HOME}/.zshrc"
echo -e

# Emacsのインストールと設定ファイルの取得・適用
Expand Down

0 comments on commit bb75ca1

Please sign in to comment.