about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2009-07-24 18:12:46 +0200
committerhut <hut@lavabit.com>2009-07-24 18:12:46 +0200
commit48d405d7fd8b92bb2e0749d01f0fe516fe7ce19d (patch)
tree0ff23300649bd21fc605d92ecad61acf0ab01654
parent6a8040c820f377722bb2cf08af1fab56569aef4b (diff)
downloadranger-48d405d7fd8b92bb2e0749d01f0fe516fe7ce19d.tar.gz
special handling for zsh
-rwxr-xr-xranger8
1 files changed, 5 insertions, 3 deletions
diff --git a/ranger b/ranger
index 93c8349e..d2f70578 100755
--- a/ranger
+++ b/ranger
@@ -9,6 +9,8 @@ fi
 
 if [ $1 ]; then
 	CMD="$1 --workaround"
+elif [ $SHELL = '/bin/zsh' ]; then
+	CMD="$0"
 else
 	CMD="ranger"
 fi
@@ -40,8 +42,8 @@ end
 # all the work is done for you automagically. This file is
 # a ruby and shellscript at the same time.
 # 
-# 4. If you can't start ranger with the command "ranger",
-# probably because it's not in your /usr/bin/ranger,
+# 4. If you don't use zsh and can't start ranger with the
+# command "ranger", probably because it's not in your /usr/bin/,
 # you will have to specify the exact path when sourcing... twice!
 # like this:
 # source ./ranger ./ranger
@@ -49,7 +51,7 @@ end
 # source /path/to/ranger /path/to/ranger
 #
 # You have to write it twice because a sourced file can't
-# know its filename, so we supply it as an argument.
+# know its filename (only in zsh), so we supply it as an argument.
 
 ##--------------------------------------------------
 # Ranger