From ff88d697e07d0e9e05dfd10dc080805ef5b45787 Mon Sep 17 00:00:00 2001 From: Austen Adler Date: Sun, 22 May 2016 01:15:43 -0400 Subject: [PATCH] Added compdefas --- shells/zshrc | 29 ++++++++++------------------- 1 file changed, 10 insertions(+), 19 deletions(-) diff --git a/shells/zshrc b/shells/zshrc index 9f68567..833a59f 100644 --- a/shells/zshrc +++ b/shells/zshrc @@ -110,7 +110,7 @@ alias skim="(head -5; tail -5) <" alias cp='rsync --partial -ha --info=progress2 "$@"' mv() { /bin/mv -v "$@" } m() { mv "$@" } -compdef _cp c cfat m mv cp copy +#compdef _cp c cfat m mv cp alias dt='date "+%F %T"' alias awake='disphost; while true; do xdotool mousemove 0 0; sleep 60; done' alias adk='/home/stonewareslord/Applications/adk/bin/studio.sh & disown' @@ -350,6 +350,15 @@ tsh(){ echo "\n\n\n\n\n\n\n\n\n\nSESSION CLOSED\n\n\n\n\n\n\n\n\n\n" fi } +compdefas () { + local a + a="$1" + shift + compdef "$_comps[$a]" "${(@)*}=$a" +} +compdefas ssh tsh +compdefas mv m mv +compdefas rsync c cp cfat mcl(){ mkdir -p $1 cd $1 @@ -486,23 +495,6 @@ k(){ #source ~/.zsh/*.zsh # To resize, # :%S/\[([# ]{9})\]/[\1 ] -####echo -ne '[# ]\r' -####antigen bundle Schnouki/git-annex-zsh-completion -###echo -ne '[## ]\r' -###antigen bundle stonewareslord/omg -###echo -ne '[### ]\r' -###antigen theme stonewareslord/oh-my-git-themes af-magic -###echo -ne '[#### ]\r' -###antigen bundle stonewareslord/lpr -####echo -ne '[##### ]\r' -####antigen bundle zsh-users/zsh-completions src -####echo -ne '[###### ]\r' -####antigen bundle sharat87/autoenv -###echo -ne '[####### ]\r' -###antigen bundle zsh-users/zsh-syntax-highlighting -###echo -ne '[######## ]\r' -###antigen apply -###echo -ne '[#########]\r' echo -ne '[# ]\r' antigen bundle stonewareslord/omg echo -ne '[## ]\r' @@ -520,5 +512,4 @@ echo . /home/stonewareslord/.opam/opam-init/init.zsh > /dev/null 2> /dev/null || true (( $+TMUX )) && unset zle_bracketed_paste - [ -f ~/.fzf.zsh ] && source ~/.fzf.zsh