From 5a0e45c5fe1233c7ae6b9e6eace611cf4698e1d6 Mon Sep 17 00:00:00 2001 From: Ein Verne Date: Thu, 23 Jul 2020 22:35:30 +0800 Subject: [PATCH] Update zsh config (#5) Fix complete:13: command not found: compdef --- .zshrc | 13 +++++-------- {conf/zsh => zsh}/alias.zsh | 2 ++ {conf/zsh => zsh}/common.zsh | 0 {conf/zsh => zsh}/env.zsh | 0 {conf/zsh => zsh}/keybindings.zsh | 0 5 files changed, 7 insertions(+), 8 deletions(-) rename {conf/zsh => zsh}/alias.zsh (85%) rename {conf/zsh => zsh}/common.zsh (100%) rename {conf/zsh => zsh}/env.zsh (100%) rename {conf/zsh => zsh}/keybindings.zsh (100%) diff --git a/.zshrc b/.zshrc index 774d869..c70c1fd 100644 --- a/.zshrc +++ b/.zshrc @@ -1,6 +1,7 @@ # If you come from bash you might have to change your $PATH. # export PATH=$HOME/bin:/usr/local/bin:$PATH +autoload -Uz compinit && compinit # you need to git clone git@github.com:zsh-users/antigen.git to $HOME if [[ -d $HOME/antigen ]]; then source $HOME/antigen/antigen.zsh @@ -125,10 +126,10 @@ ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE='fg=6' #transfer() { if [ $# -eq 0 ]; then echo -e "No arguments specified. Usage:\necho transfer /tmp/test.md\ncat /tmp/test.md | transfer test.md"; return 1; fi #tmpfile=$( mktemp -t transferXXX ); if tty -s; then basefile=$(basename "$1" | sed -e 's/[^a-zA-Z0-9._-]/-/g'); curl --progress-bar --upload-file "$1" "https://transfer.sh/$basefile" >> $tmpfile; else curl --progress-bar --upload-file "-" "https://transfer.sh/$1" >> $tmpfile ; fi; cat $tmpfile; rm -f $tmpfile; } -source $HOME/dotfiles/conf/zsh/common.zsh -source $HOME/dotfiles/conf/zsh/keybindings.zsh -source $HOME/dotfiles/conf/zsh/alias.zsh -source $HOME/dotfiles/conf/zsh/env.zsh +source $HOME/dotfiles/zsh/common.zsh +source $HOME/dotfiles/zsh/keybindings.zsh +source $HOME/dotfiles/zsh/alias.zsh +source $HOME/dotfiles/zsh/env.zsh if [[ -f ~/.zshrc.local ]]; then source $HOME/.zshrc.local @@ -136,7 +137,6 @@ fi ZSH_DISABLE_COMPFIX=true -autoload -Uz compinit && compinit fpath=(~/.zsh/completions $fpath) # space @@ -152,9 +152,6 @@ SPACESHIP_DIR_COLOR="${SPACESHIP_DIR_COLOR="cyan"}" # usage adb-screencap > screen.png alias adbcap="adb shell screencap -p" -alias proxy='export all_proxy=socks5://127.0.0.1:1080' -alias unproxy='unset all_proxy' - # fzf config [ -f ~/.fzf.zsh ] && source ~/.fzf.zsh export FZF_DEFAULT_COMMAND='ag --hidden --ignore .git --ignore .idea -l -g ""' diff --git a/conf/zsh/alias.zsh b/zsh/alias.zsh similarity index 85% rename from conf/zsh/alias.zsh rename to zsh/alias.zsh index bf069ae..60c6a98 100644 --- a/conf/zsh/alias.zsh +++ b/zsh/alias.zsh @@ -16,3 +16,5 @@ alias mci="mvn -e -U clean install" # https://stackoverflow.com/a/15503178/1820217 alias gitlog="git ls-files -z | xargs -0n1 git blame -w --show-email | perl -n -e '/^.*?\((.*?)\s+[\d]{4}/; print $1,"\n"' | sort -f | uniq -c | sort -n" +alias proxy='export all_proxy=socks5://127.0.0.1:1080' +alias unproxy='unset all_proxy' diff --git a/conf/zsh/common.zsh b/zsh/common.zsh similarity index 100% rename from conf/zsh/common.zsh rename to zsh/common.zsh diff --git a/conf/zsh/env.zsh b/zsh/env.zsh similarity index 100% rename from conf/zsh/env.zsh rename to zsh/env.zsh diff --git a/conf/zsh/keybindings.zsh b/zsh/keybindings.zsh similarity index 100% rename from conf/zsh/keybindings.zsh rename to zsh/keybindings.zsh