view dot_config/private_fish/functions/fzf_cdhist.fish @ 1091:a1fab5298ef6 draft tip

feat: update to bitwarden 25.3 and enable ssh-agent
author Zeger Van de Vannet <zeger@vandevan.net>
date Mon, 21 Apr 2025 20:13:02 +0200
parents 7db5c9c8016f
children
line wrap: on
line source

function fzf_cdhist-d 'cd to one of the previously visited locations'
	# Clear non-existent folders from cdhist.
	set -l buf
	for i in (seq 1 (count $dirprev))
		set -l dir $dirprev[$i]
		if test -d $dir
			set buf $buf $dir
		end
	end
	set dirprev $buf
	string join \n $dirprev | tac | sed 1d | eval (__fzfcmd) +m --tiebreak=index --toggle-sort=ctrl-r $FZF_CDHIST_OPTS | read -l result
	[ "$result" ]; and cd $result
	commandline -f repaint
end