navi/navi.plugin.zsh
Denis Isidoro 4627b5db0b
Add widget for bash (#105)
Partially solves #37
2019-10-02 12:12:20 -03:00

12 lines
250 B
Bash

_navi_path=$(dirname $0:A)
_call_navi() {
local buff="$BUFFER"
zle kill-whole-line
local cmd="$(NAVI_USE_FZF_ALL_INPUTS=true "${_navi_path}/navi" --print <> /dev/tty)"
zle -U "${buff}${cmd}"
}
zle -N _call_navi
bindkey '^g' _call_navi