Skip to content

Instantly share code, notes, and snippets.

@itkr
Last active March 17, 2017 01:31
Show Gist options
  • Save itkr/c59016f8e150b23bc89df795c1283153 to your computer and use it in GitHub Desktop.
Save itkr/c59016f8e150b23bc89df795c1283153 to your computer and use it in GitHub Desktop.
`fzf`を使ってヒストリーからコマンドを実行する
gitco() {
git checkout `git branch | peco | awk '{print $NF}'`
}
hiscopy() {
echo `history | fzf --tac | awk '{$1="";print $0;}'` | pbcopy
}
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