diff --git a/zsh/functions.zsh b/zsh/aliases.zsh similarity index 91% rename from zsh/functions.zsh rename to zsh/aliases.zsh index 7348f05..35ef62b 100644 --- a/zsh/functions.zsh +++ b/zsh/aliases.zsh @@ -26,10 +26,8 @@ tmux() { command tmux -2 $@ } atmux() { tmux attach || tmux } sush() { command sudo -Es } -emd() { command emacs --daemon &>/dev/null &! } -ema() { command emacsclient -a '' "$@"} -emg() { ema -c $@ } -em() { ema -t $@ } +ema() { command emacsclient -c $@ } +em() { command emacsclient -t $@ } tig() { termcompat tig $@ } gsi() { tig status } @@ -53,7 +51,6 @@ else gdf() { gdiff $@ } fi -unalias ls ld ll 2>/dev/null if [[ -x $(whence -p exa) ]]; then ls() { command exa --group-directories-first $@ } ll() { ls -alg $@ } diff --git a/zsh/init.zsh b/zsh/init.zsh index 33b23cf..0e34441 100644 --- a/zsh/init.zsh +++ b/zsh/init.zsh @@ -8,7 +8,7 @@ confdir=$(dirname $0) conflist=( settings.zsh - functions.zsh + aliases.zsh prompt-powerline.zsh ) diff --git a/zsh/prompt-powerline.zsh b/zsh/prompt-powerline.zsh index c07d267..350a83d 100644 --- a/zsh/prompt-powerline.zsh +++ b/zsh/prompt-powerline.zsh @@ -114,7 +114,7 @@ precmd.prompt.git() { esac done <<< $raw_status - for i in git_unstaged git_staged git_untracked git_unmerged; do + for i in git_unstaged git_untracked git_unmerged git_staged; do (( count[$i] )) && precmd.prompt.add "$count[$i]$prompt_symbols[$i]" $prompt_colors[$i] done } diff --git a/zsh/settings.zsh b/zsh/settings.zsh index 0a6f787..e12d6ac 100644 --- a/zsh/settings.zsh +++ b/zsh/settings.zsh @@ -12,6 +12,7 @@ export PAGER=less export EDITOR=vim export TIME_STYLE=long-iso export SSH_AUTH_SOCK="$HOME/.ssh/ssh_auth_sock" +export ALTERNATE_EDITOR= bindkey -e bindkey $terminfo[kdch1] delete-char @@ -38,3 +39,5 @@ zstyle ':completion:*' rehash true zstyle ':completion:*:kill:*:processes' command 'ps --forest -A -o pid,user,cmd' zstyle ':completion:*:processes-names' command 'ps axho command' zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS} + +unalias ld ls ll &>/dev/null