From d008817c6d3ea828e12bed2c271c9ae36f80cbda Mon Sep 17 00:00:00 2001 From: hut Date: Tue, 15 Feb 2011 01:03:59 +0000 Subject: Added --choosedir, a more logical alternative to --fail-unless-cd also updated the bash script in README to use the new option --- README | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'README') diff --git a/README b/README index c1462ec3..cf0e3577 100644 --- a/README +++ b/README @@ -96,12 +96,11 @@ Combine Ranger With Other Applications Add this to your ~/.bashrc to use ranger as a directory switcher: 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" + ranger --choosedir=/tmp/chosen + if [ -f /tmp/chosen -a "$(cat /tmp/chosen)" != "$(pwd | tr -d "\n")" ]; then + cd "$(cat /tmp/chosen)" fi + rm -f /tmp/chosen } bind '"\C-o":"ranger-cd\C-m"' -- cgit 1.4.1-2-gfad0 ;akspecs@tilde.institute>
about summary refs log tree commit diff stats
path: root/setup.py
blob: 234bba19f659f28ed685b7a6d816af53f1a4f09a (plain) (blame)
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