[feature] allow ranger to change working directory

This commit is contained in:
Klesh Wong 2020-11-07 01:40:04 +08:00
parent 4363cc0419
commit 52bd51d7a9

View File

@ -77,6 +77,19 @@ if status is-interactive
end
end
function ranger
set tempfile (mktemp -t tmp.XXXXXX)
command ranger --choosedir=$tempfile $argv
if test -s $tempfile
set ranger_pwd (cat $tempfile)
if test -n $ranger_pwd -a -d $ranger_pwd
builtin cd -- $ranger_pwd
end
end
command rm -f -- $tempfile
end
append-path-if-exists ~/.yarn/bin
alias k="kubectl"
alias kcc="k config get-contexts"