diff --git a/dotfiles/zshenv b/dotfiles/zshenv index c3f6cf4..6e88a2f 100644 --- a/dotfiles/zshenv +++ b/dotfiles/zshenv @@ -20,6 +20,22 @@ export ANSIBLE_NOCOWS=1 # Include $(go env GOPATH) to PATH [[ $(command -v go) ]] && [[ -d "$(go env GOPATH)/bin" ]] && export PATH="$(go env GOPATH)/bin:${PATH}" +# exa +if [[ $(command -v exa) ]]; then + [[ $(whence -w l) == *alias* ]] && unalias l + lfunc() { + exal -T -L ${1:-1} + } + [[ $(whence -w la) == *alias* ]] && unalias la + lafunc() { + exal -a -T -L ${1:-1} + } + alias exal="exa -l -F -g -h --extended --git --group-directories-first --icons" + alias l='lfunc' + alias la='lafunc' + alias ll="lfunc 2" +fi + {%@@ if profile == 'AINCRAD-wsl' or profile == 'AINCRAD' or profile == 'YOETUNHEIMR-wsl' or profile == 'yoetunheimr' or profile == 'ymir' @@%} # Connect to windows ssh pageant # https://github.com/BlackReloaded/wsl2-ssh-pageant diff --git a/dotfiles/zshrc b/dotfiles/zshrc index 9ca095f..00fa33a 100644 --- a/dotfiles/zshrc +++ b/dotfiles/zshrc @@ -158,6 +158,22 @@ source ${ZSH}/oh-my-zsh.sh alias ssh-no-check="ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" +# exa +if [[ $(command -v exa) ]]; then + [[ $(whence -w l) == *alias* ]] && unalias l + lfunc() { + exal -T -L ${1:-1} + } + [[ $(whence -w la) == *alias* ]] && unalias la + lafunc() { + exal -a -T -L ${1:-1} + } + alias exal="exa -l -F -g -h --extended --git --group-directories-first --icons" + alias l='lfunc' + alias la='lafunc' + alias ll="lfunc 2" +fi + # Initialize pyenv [[ $(command -v pyenv) ]] && export PYENV_ROOT="$HOME/.pyenv" [[ $(command -v pyenv) ]] && command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"