fish: update configs and functions

This commit is contained in:
Hydroxycarbamide 2024-09-24 10:35:49 +02:00
parent 3b5aebcd93
commit 8c262bb069
5 changed files with 47 additions and 21 deletions

View file

@ -0,0 +1,3 @@
function fish_greeting
catnap
end

View file

@ -27,7 +27,7 @@ function n --wraps nnn --description 'support nnn quit and change directory'
# The command function allows one to alias this function to `nnn` without
# making an infinitely recursive alias
command nnn $argv
command nnn -P p $argv
if test -e $NNN_TMPFILE
source $NNN_TMPFILE

View file

@ -0,0 +1,8 @@
function y
set tmp (mktemp -t "yazi-cwd.XXXXXX")
yazi $argv --cwd-file="$tmp"
if set cwd (command cat -- "$tmp"); and [ -n "$cwd" ]; and [ "$cwd" != "$PWD" ]
builtin cd -- "$cwd"
end
rm -f -- "$tmp"
end