dotfiles/fish.configlink/functions/fcd.fish

13 lines
328 B
Fish
Raw Normal View History

2021-05-12 22:59:22 +00:00
function fcd --description 'Jump to directory' -a 'directory'
if test -z $directory
set directory "$HOME"
end
if ! test -d $directory
echo "Directory not found: $directory"
return 1
end
set jump (fd -t d . $directory | fzf)
and cd $jump $argv;
2021-11-16 12:49:29 +00:00
and commandline -f execute;
2021-05-08 21:39:52 +00:00
end