From 547173247b8ce5dc40fa4f8b9fcf822270661c0f Mon Sep 17 00:00:00 2001 From: hut Date: Sat, 11 Sep 2010 20:49:05 +0200 Subject: README: added ranger starting function example --- README | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'README') diff --git a/README b/README index babcfbbb..80331dcb 100644 --- a/README +++ b/README @@ -78,6 +78,20 @@ or type Q to quit. To customize ranger, copy the files from ranger/defaults/ to ~/.config/ranger/ and modify them according to your wishes. +The author of ranger uses this function (in ~/.bashrc) to start ranger: +function ranger-cd { + before="$(pwd)" + python2.6 /the/path/to/ranger/ranger.py --fail-unless-cd "$@" || return 0 + after="$(grep \^\' ~/.config/ranger/bookmarks | cut -b3-)" + if [[ "$before" != "$after" ]]; then + cd "$after" + fi +} +bind '"\C-o":"ranger-cd\C-m"' + +This changes the directory after you close ranger and adds the shortcut + for starting ranger. + Troubleshooting, Getting Help ----------------------------- -- cgit 1.4.1-2-gfad0 ew 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