fish: fzf-select replaces current job instead of whole buffer
parent
b7ad16263d
commit
ea6b3cc136
|
@ -5,10 +5,10 @@ bind \ec capitalize-word
|
||||||
bind \eC fzf-cd-widget
|
bind \eC fzf-cd-widget
|
||||||
|
|
||||||
function __fzf-select -d 'fzf commandline and print unescaped selection back to commandline'
|
function __fzf-select -d 'fzf commandline and print unescaped selection back to commandline'
|
||||||
set -l cmd (commandline)
|
set -l cmd (commandline -j)
|
||||||
[ $cmd ]; or return
|
[ "$cmd" ]; or return
|
||||||
eval $cmd | eval (__fzfcmd) -m --tac --tiebreak=index --toggle-sort=ctrl-r | string join ' ' | read -l result
|
eval $cmd | eval (__fzfcmd) -m --tac --tiebreak=index --toggle-sort=ctrl-r | string join ' ' | read -l result
|
||||||
[ "$result" ]; and commandline -- $result
|
[ "$result" ]; and commandline -j -- $result
|
||||||
commandline -f repaint
|
commandline -f repaint
|
||||||
end
|
end
|
||||||
bind \e\cm __fzf-select
|
bind \e\cm __fzf-select
|
||||||
|
|
Loading…
Reference in New Issue