mirror of
https://github.com/gotbletu/shownotes
synced 2024-11-10 19:10:36 +00:00
24 lines
646 B
Plaintext
24 lines
646 B
Plaintext
Notes for Video: http://www.youtube.com/watch?v=hO8vd1y0h6g
|
|
|
|
|
|
|
|
# ZSH keybinding example; ~/.zshrc
|
|
|
|
fzf_history() { zle -I; eval $(history | fzf +s | sed 's/ *[0-9]* *//') ; }; zle -N fzf_history; bindkey '^F' fzf_history
|
|
|
|
fzf_killps() { zle -I; ps -ef | sed 1d | fzf -m | awk '{print $2}' | xargs kill -${1:-9} ; }; zle -N fzf_killps; bindkey '^Q' fzf_killps
|
|
|
|
fzf_cd() { zle -I; DIR=$(find ${1:-*} -path '*/\.*' -prune -o -type d -print 2> /dev/null | fzf) && cd "$DIR" ; }; zle -N fzf_cd; bindkey '^E' fzf_cd
|
|
|
|
|
|
|
|
# BASH keybinding example; ~/.bashrc
|
|
|
|
fh() {
|
|
eval $(history | fzf +s | sed 's/ *[0-9]* *//')
|
|
}
|
|
|
|
bind '"\C-F":"fh\n"' # fzf history
|
|
|
|
|