From 4d85fbdca76f298642a8d5afdcc495bdf9fc0d60 Mon Sep 17 00:00:00 2001 From: Von Random Date: Tue, 23 Aug 2022 16:13:04 +0300 Subject: [PATCH] zsh: more emacs related tweaks --- zsh/{functions.zsh => aliases.zsh} | 7 ++----- zsh/init.zsh | 2 +- zsh/prompt-powerline.zsh | 2 +- zsh/settings.zsh | 3 +++ 4 files changed, 7 insertions(+), 7 deletions(-) rename zsh/{functions.zsh => aliases.zsh} (91%) 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