summary refs log tree commit diff stats
path: root/README
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2010-09-11 20:49:05 +0200
committerhut <hut@lavabit.com>2010-09-11 20:49:05 +0200
commit547173247b8ce5dc40fa4f8b9fcf822270661c0f (patch)
treea9355dfa86f359b5482d4b48e7a6f75e939eab2d /README
parentb1c1e1d88bc511306e4d786dea4234f1cbc6f041 (diff)
downloadranger-547173247b8ce5dc40fa4f8b9fcf822270661c0f.tar.gz
README: added ranger starting function example
Diffstat (limited to 'README')
-rw-r--r--README14
1 files changed, 14 insertions, 0 deletions
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
+<CTRL-O> for starting ranger.
+
 
 Troubleshooting, Getting Help
 -----------------------------
m> 2015-02-26 23:23:15 +0000 Updated themes for release' href='/danisanti/profani-tty/commit/themes/forest?id=30b5f112fd81890411d6fe52c1f442f4433e0d01'>30b5f112 ^
a4b4ed71 ^

30b5f112 ^




a4b4ed71 ^





30b5f112 ^
71679a31 ^

a4b4ed71 ^


a4b4ed71 ^

2f82f50a ^
86c1c388 ^
1a3dc91e ^
a4b4ed71 ^

a4b4ed71 ^
fbc30231 ^

















cd2458c0 ^

0ae975c2 ^

b21edfaa ^
1900402f ^
0aa758cb ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81