[*] Multiple new configs
This commit is contained in:
8
fish/.config/fish/functions/y.fish
Normal file
8
fish/.config/fish/functions/y.fish
Normal file
@@ -0,0 +1,8 @@
|
||||
function y
|
||||
set tmp (mktemp -t "yazi-cwd.XXXXXX")
|
||||
command yazi $argv --cwd-file="$tmp"
|
||||
if read -z cwd < "$tmp"; and [ "$cwd" != "$PWD" ]; and test -d "$cwd"
|
||||
builtin cd -- "$cwd"
|
||||
end
|
||||
rm -f -- "$tmp"
|
||||
end
|
||||
Reference in New Issue
Block a user