FollieHiyuki-dotfiles/home/.config/fish/functions/fzf-bcd-widget.fish
2021-02-13 19:28:59 +03:00

6 lines
234 B
Fish

function fzf-bcd-widget -d 'cd backwards'
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
[ "$result" ]; and cd $result
commandline -f repaint
end