Skip to content

Instantly share code, notes, and snippets.

@tuki0918
Created July 3, 2014 13:35
Show Gist options
  • Save tuki0918/57420fbccbb22c7b8a4e to your computer and use it in GitHub Desktop.
Save tuki0918/57420fbccbb22c7b8a4e to your computer and use it in GitHub Desktop.
peco: Terminalからお気に入りのディレクトリを開く
fpath=($HOME/zsh/functions/cd-bookmark(N-/) $fpath)
autoload -Uz cd-bookmark
alias cdb='cd-bookmark'
function peco_open_bookmark() {
cdb | peco | awk -F"|" '{ print $2 }' | xargs open
}
zle -N peco_open_bookmark
bindkey '^@' peco_open_bookmark
$ mkdir -p $HOME/zsh/functions
$ cd $HOME/zsh/functions
$ git clone https://github.com/mollifier/cd-bookmark.git cd-bookmark
-a [BOOKMARK_ID] add current directory to bookmark with no BOOKMARK_ID, automatically use free ID number as BOOKMARK_ID
-c BOOKMARK_ID change directory which is identified by BOOKMARK_ID
-l list bookmark
-e edit bookmark file
-p BOOKMARK_ID display bookmark real path for BOOKMARK_ID
-h display this help and exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment