mirror of
https://github.com/nmasur/dotfiles
synced 2024-12-26 05:54:54 +00:00
13 lines
328 B
Fish
13 lines
328 B
Fish
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;
|
|
and commandline -f execute;
|
|
end
|