Created
June 23, 2014 02:53
-
-
Save naoty/5958e22135579b6bc7b6 to your computer and use it in GitHub Desktop.
change directory selected on peco
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ディレクトリスタックを重複を省いてファイルに保存する | |
dirs -lp > $HOME/.dirs.tmp | |
cat $HOME/.dirs.tmp | sort | uniq > $HOME/.dirs | |
rm $HOME/.dirs.tmp |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function peco_cd_directory_stack() { | |
cd `cat $HOME/.dirs | peco` | |
} | |
zle -N peco_cd_directory_stack | |
bindkey '^f' peco_cd_directory_stack |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment