mirror of
https://github.com/Ascyii/dotfiles.git
synced 2026-01-01 15:04:24 -05:00
Custom fish function and bash yazi with fisher
This commit is contained in:
8
cli/dot-config/fish/functions/r.fish
Normal file
8
cli/dot-config/fish/functions/r.fish
Normal file
@@ -0,0 +1,8 @@
|
||||
function r
|
||||
set tmp (mktemp -t "yazi-cwd.XXXXXX")
|
||||
yazi $argv --cwd-file="$tmp"
|
||||
if read -z cwd <"$tmp"; and [ -n "$cwd" ]; and [ "$cwd" != "$PWD" ]
|
||||
builtin cd -- "$cwd"
|
||||
end
|
||||
rm -f -- "$tmp"
|
||||
end
|
||||
Reference in New Issue
Block a user