diff options
author | Nick Shipp <nick@shipp.ninja> | 2017-05-07 09:04:01 -0400 |
---|---|---|
committer | Nick Shipp <nick@shipp.ninja> | 2017-05-07 09:04:01 -0400 |
commit | c012f55efda29f09179e921cf148d79deb57616e (patch) | |
tree | ff0ad37f22622d51194cab192a2aa4b0106d7ad0 /zsh/functions.zsh | |
parent | 4ca8f6608883d230131f8a9e8b6d6c091c516049 (diff) |
Much maturering of vim configs
Diffstat (limited to 'zsh/functions.zsh')
-rw-r--r-- | zsh/functions.zsh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/zsh/functions.zsh b/zsh/functions.zsh index 6bd9482..6003dea 100644 --- a/zsh/functions.zsh +++ b/zsh/functions.zsh @@ -25,3 +25,18 @@ function note { fi popd } + +function fuzzy_history { + local choice + choice=($(fc -l 0 | fzf --tac --no-sort)) + [[ $#choice -gt 1 ]] || return + HISTNO=$(sed 's/[^\d]//g' <<< $choice[1]) + BUFFER=$choice[2,-1] +} + +function fuzzy_dirstack { + local choice + choice=$(dirs -pl | fzf --tac --no-sort) + [[ -n $choice ]] && cd $choice + zle .reset-prompt +} |