From c0f2fc72eccb4127fba5f48ce4b422487d6ec752 Mon Sep 17 00:00:00 2001 From: hut Date: Mon, 13 Apr 2015 12:49:49 +0200 Subject: moved "doc/examples" to "examples" for more visibility --- doc/examples/bash_automatic_cd.sh | 21 --------------------- 1 file changed, 21 deletions(-) delete mode 100644 doc/examples/bash_automatic_cd.sh (limited to 'doc/examples/bash_automatic_cd.sh') diff --git a/doc/examples/bash_automatic_cd.sh b/doc/examples/bash_automatic_cd.sh deleted file mode 100644 index 465c9c80..00000000 --- a/doc/examples/bash_automatic_cd.sh +++ /dev/null @@ -1,21 +0,0 @@ -# Compatible with ranger 1.4.2 through 1.6.* -# -# Automatically change the directory in bash after closing ranger -# -# This is a bash function for .bashrc to automatically change the directory to -# the last visited one after ranger quits. -# To undo the effect of this function, you can type "cd -" to return to the -# original directory. - -function ranger-cd { - tempfile="$(mktemp)" - /usr/bin/ranger --choosedir="$tempfile" "${@:-$(pwd)}" - test -f "$tempfile" && - if [ "$(cat -- "$tempfile")" != "$(echo -n `pwd`)" ]; then - cd -- "$(cat "$tempfile")" - fi - rm -f -- "$tempfile" -} - -# This binds Ctrl-O to ranger-cd: -bind '"\C-o":"ranger-cd\C-m"' -- cgit 1.4.1-2-gfad0