fish/fzf: Lift the (__fzfcmd) workaround since fish 2.6 fixes it
parent
00ead81e2f
commit
e3fbb7b508
|
@ -62,9 +62,8 @@ bind -M insert \t fzf-complete
|
||||||
bind -M insert \e\t complete
|
bind -M insert \e\t complete
|
||||||
|
|
||||||
function fzf-bcd-widget -d 'cd backwards'
|
function fzf-bcd-widget -d 'cd backwards'
|
||||||
## TODO: (fish upsteam bug) Cannot use eval here.
|
set -lx FZF_DEFAULT_OPTS "$FZF_DEFAULT_OPTS $FZF_BCD_OPTS"
|
||||||
# pwd | awk -v RS=/ '/\n/ {exit} {p=p $0 "/"; print p}' | tac | eval (__fzfcmd) +m --select-1 --exit-0 $FZF_BCD_OPTS | read -l result
|
pwd | awk -v RS=/ '/\n/ {exit} {p=p $0 "/"; print p}' | tac | eval (__fzfcmd) +m --select-1 --exit-0 | read -l result
|
||||||
pwd | awk -v RS=/ '/\n/ {exit} {p=p $0 "/"; print p}' | tac | fzf +m --select-1 --exit-0 --preview='preview {}' | read -l result
|
|
||||||
[ "$result" ]; and cd $result
|
[ "$result" ]; and cd $result
|
||||||
commandline -f repaint
|
commandline -f repaint
|
||||||
end
|
end
|
||||||
|
@ -81,9 +80,8 @@ function fzf-cdhist-widget -d 'cd to one of the previously visited locations'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
set dirprev $buf
|
set dirprev $buf
|
||||||
## TODO: (fish upsteam bug) Cannot use eval here.
|
set -lx FZF_DEFAULT_OPTS "$FZF_DEFAULT_OPTS $FZF_CDHIST_OPTS"
|
||||||
# string join \n $dirprev | tac | sed 1d | eval (__fzfcmd) +m $FZF_CDHIST_OPTS | read -l result
|
string join \n $dirprev | tac | sed 1d | eval (__fzfcmd) +m --tiebreak=index --toggle-sort=ctrl-r | read -l result
|
||||||
string join \n $dirprev | tac | sed 1d | fzf +m --preview='preview {}' | read -l result
|
|
||||||
[ "$result" ]; and cd $result
|
[ "$result" ]; and cd $result
|
||||||
commandline -f repaint
|
commandline -f repaint
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue