Created
June 29, 2014 12:44
-
-
Save katsuma/931035b7a2817bb63c09 to your computer and use it in GitHub Desktop.
e や o の結果をhistoryに残しておく
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
pe() { peco | while read LINE; do $@ $LINE; print -s "$@ $LINE"; done } | |
alias o='git ls-files | pe open' | |
alias e='ghq list -p | pe cd' | |
zshaddhistory() { | |
local line=${1%%$'\n'} | |
local cmd=${line%% *} | |
[[ ${cmd} != (l|l[sal]) | |
&& ${cmd} != (m|man) | |
&& ${cmd} != (p|print) | |
&& ${cmd} != (e) | |
&& ${cmd} != (o) | |
]] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment