Add a simple widget on Ctrl-G for fzfing my frecently used directories from z
This commit is contained in:
parent
53e8606b27
commit
c8f970cc1a
1 changed files with 10 additions and 0 deletions
|
@ -32,3 +32,13 @@ zle -N bracketed-paste bracketed-paste-magic
|
||||||
autoload -Uz url-quote-magic
|
autoload -Uz url-quote-magic
|
||||||
url-quote-magic-with-highlight() { url-quote-magic; _zsh_highlight }
|
url-quote-magic-with-highlight() { url-quote-magic; _zsh_highlight }
|
||||||
zle -N self-insert url-quote-magic-with-highlight
|
zle -N self-insert url-quote-magic-with-highlight
|
||||||
|
|
||||||
|
__fzf-z() {
|
||||||
|
z -l | tac | cut -c 12- | fzf --preview 'tree -FCL 2 {}'
|
||||||
|
}
|
||||||
|
fzf-z() {
|
||||||
|
LBUFFER+="$(__fzf-z)"
|
||||||
|
zle redisplay
|
||||||
|
}
|
||||||
|
zle -N fzf-z
|
||||||
|
bindkey '^G' fzf-z
|
||||||
|
|
Loading…
Reference in a new issue