Skip to content

Instantly share code, notes, and snippets.

@astrsk-hori
Last active August 29, 2015 14:06
Show Gist options
  • Save astrsk-hori/7251ea922e59a7871fda to your computer and use it in GitHub Desktop.
Save astrsk-hori/7251ea922e59a7871fda to your computer and use it in GitHub Desktop.
oh-my-zshの大量のaliasをpecoで絞り込む ref: http://qiita.com/astrsk_hori/items/d01f83450b4181c2681b
function peco-alias(){
TARGET_ALIAS=$(alias | peco --query "$LBUFFER")
BUFFER=$(echo "$TARGET_ALIAS"|awk -F '=' '{print $1}')
CURSOR=$#BUFFER
zle clear-screen
}
zle -N peco-alias
bindkey '^@^a' peco-alias
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment