Last active
March 17, 2017 01:31
-
-
Save itkr/c59016f8e150b23bc89df795c1283153 to your computer and use it in GitHub Desktop.
`fzf`を使ってヒストリーからコマンドを実行する
This file contains 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
gitco() { | |
git checkout `git branch | peco | awk '{print $NF}'` | |
} |
This file contains 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
hiscopy() { | |
echo `history | fzf --tac | awk '{$1="";print $0;}'` | pbcopy | |
} |
This file contains 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
hisdo() { | |
hisdo_cmd=`history | fzf --tac | awk '{$1="";print $0;}'` | |
echo ${hisdo_cmd} | |
eval ${hisdo_cmd} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment