Skip to content

Instantly share code, notes, and snippets.

@tokorom
Created July 25, 2014 02:58
Show Gist options
  • Save tokorom/00f4696590d187b07e97 to your computer and use it in GitHub Desktop.
Save tokorom/00f4696590d187b07e97 to your computer and use it in GitHub Desktop.
# autojump
function autojump-peco() {
local cd_history_path="~/.local/share/autojump/autojump.txt"
local SELECTED=$(eval more $cd_history_path | peco | cut -f2)
if [ 0 -ne ${#SELECTED} ]; then
eval echo "cd $SELECTED"
eval cd $SELECTED
fi
}
zle -N autojump-peco
alias jj="autojump-peco"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment