From 0b5c4cbe45f18bb9b5cd412b3afbee59ae8d5a7b Mon Sep 17 00:00:00 2001 From: hut Date: Fri, 27 Nov 2009 21:52:23 +0100 Subject: cd-after-exit --- wrapper.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 wrapper.sh (limited to 'wrapper.sh') 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 -- cgit 1.4.1-2-gfad0 option> Soul of a tiny new machine. More thorough tests → More comprehensible and rewrite-friendly software → More resilient society.Kartik K. Agaram <vc@akkartik.com>
about summary refs log blame commit diff stats
path: root/html/fork.mu.html
blob: 69dc4e302c72721d71dfb610e4175d1d313c0c57 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12