diff options
author | hut <hut@lavabit.com> | 2009-11-27 21:52:23 +0100 |
---|---|---|
committer | hut <hut@lavabit.com> | 2009-11-27 21:52:23 +0100 |
commit | 0b5c4cbe45f18bb9b5cd412b3afbee59ae8d5a7b (patch) | |
tree | a022f8542a57eaf7bcfa4530248a797bd6e37ee6 /wrapper.sh | |
parent | dd7a4f636fcc3c68b061d5af265aeaf38f70e45b (diff) | |
download | ranger-0b5c4cbe45f18bb9b5cd412b3afbee59ae8d5a7b.tar.gz |
cd-after-exit
Diffstat (limited to 'wrapper.sh')
-rwxr-xr-x | wrapper.sh | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/wrapper.sh b/wrapper.sh new file mode 100755 index 00000000..080033c2 --- /dev/null +++ b/wrapper.sh @@ -0,0 +1,16 @@ +#!/bin/sh +# +# Use this file to activate a special feature: +# Changing the directory of the parent shell after exiting Ranger. +# To use this, create an alias for this command in your shell config: +# +# source path/to/wrapper.sh path/to/ranger.py +# +# (This does not work with all shells, it was successfully tested +# with bash and zsh though.) +# +if [ $1 ]; then + cd "`$1 --cd-after-exit $@ 3>&1 1>&2 2>&3 3>&-`" +else + echo "use with: source path/to/wrapper.sh path/to/ranger.py" +fi |