summary refs log tree commit diff stats
path: root/ranger.py
diff options
context:
space:
mode:
Diffstat (limited to 'ranger.py')
-rwxr-xr-xranger.py21
1 files changed, 8 insertions, 13 deletions
diff --git a/ranger.py b/ranger.py
index 0a9d54c9..1c06f125 100755
--- a/ranger.py
+++ b/ranger.py
@@ -19,20 +19,15 @@
 #
 # ----------------------------------------------------------------------------
 #
-# An embedded shell script. It allows you to change the directory
-# of the parent shell to the last visited directory in ranger after exit.
-# For more information, check out doc/cd-after-exit.txt
-# To enable this, start ranger with:
-#     source /path/ranger /path/ranger
+# An embedded shell script for backwards compatibility.
 """":
-if [ $1 ]; then
-	ranger_exec="$1"
-	shift
-	cd "`exec $ranger_exec --cd-after-exit $@ 3>&1 1>&2 2>&3 3>&-`"
-	unset ranger_exec
-else
-	echo "usage: source path/to/ranger.py path/to/ranger.py"
-fi
+echo "Warning: the cd-after-exit feature has been removed."
+echo "You can get the functionality by using such a function:"
+echo 'ranger() {'
+echo '    $(which ranger) $@ &&'
+echo '    cd "$(grep \^\'"'"' ~/.ranger/bookmarks | cut -b3-)"'
+echo '}'
+$1
 return 1
 """
 
>117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248