diff --git a/fish/config/config.fish b/fish/config/config.fish index c77ed8a..5412781 100644 --- a/fish/config/config.fish +++ b/fish/config/config.fish @@ -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"