about summary refs log tree commit diff stats
path: root/code/help.rb
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2009-07-20 04:54:47 +0200
committerhut <hut@lavabit.com>2009-07-20 04:54:47 +0200
commit381f3aee6bf7aec8c5336fcfbbd86b1b32affc8f (patch)
tree7ccc203b5b6cecc599daef02862d162434875865 /code/help.rb
parent8dee61df3a8c767dd4960711e1b785b293bf5575 (diff)
downloadranger-381f3aee6bf7aec8c5336fcfbbd86b1b32affc8f.tar.gz
little hack for cd-after-exit
if you want to change the directory to where you left ranger
when you exit, you can now simply use this in your .bashrc:
alias ranger='source ranger'
or even:
alias ranger='. ranger'

the old way was:
alias ranger='cd "`ranger --cd 3>&1 1>&2`"'
Diffstat (limited to 'code/help.rb')
-rw-r--r--code/help.rb23
1 files changed, 10 insertions, 13 deletions
diff --git a/code/help.rb b/code/help.rb
index 1726e484..41f4212d 100644
--- a/code/help.rb
+++ b/code/help.rb
@@ -236,24 +236,21 @@ module Fm
 	One possible use of ranger is navigating quickly to a directory,
 	exit ranger, return to the shell but stay at the location where you
 	left with ranger.
-	To use this feature, do the following:
 
-	1. enter this line into your ~/.bashrc (if you use bash. other
-	shells should be similar):
-		alias ranger='cd "`/path/to/ranger --cd 3>&1 1>&2`"'
+	To use this feature, you have to start ranger with:
+	. /path/to/ranger.rb
 	
-	2. reload your bashrc by typing:
-		source ~/.bashrc
+	The dot and space at the start is important!
 
-	3. type in ranger, navigate and quit. in bash, you should still
-		be in the directory where you left with ranger.
+	of course you can create an alias in our ~/.bashrc
+	alias fm='. /path/to/ranger.rb'
 
-	The --cd switch writes the pwd to the 3rd file descriptor on exit,
-	the cd command will read from it and change the dir accordingly.
-	If you decide that you don't want to change the directory after all,
-	you can toggle the --cd switch inside ranger by typing tc.
-	Also, typing ZX quits ranger with the --cd switch inverted.
+	I use fm (which means filemanager) because it's quick to type
+	and because fm was the working title of ranger in the early days.
+	
 
+	If you're inside ranger and decide to stay in the original directory
+	after all, you can type tc or quit with ZX