summary refs log tree commit diff stats
path: root/doc/uml/uml.prj
Commit message (Collapse)AuthorAgeFilesLines
* moved /uml to /doc/umlhut2009-12-251-0/+43
avabit.com> 2012-08-06 06:39:26 +0200 added the examples from the man page to the examples directory' href='/akspecs/ranger/commit/examples/bash_automatic_cd.sh?h=v1.9.0b5&id=796074b541aaca459c594fe517c11d275778eef6'>796074b5 ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21

                                            


















                                                                              
# Compatible with ranger 1.4.2 through 1.6.*
#
# Automatically change the directory in bash after closing ranger
#
# This is a bash function for .bashrc to automatically change the directory to
# the last visited one after ranger quits.
# To undo the effect of this function, you can type "cd -" to return to the
# original directory.

function ranger-cd {
    tempfile='/tmp/chosendir'
    /usr/bin/ranger --choosedir="$tempfile" "${@:-$(pwd)}"
    test -f "$tempfile" &&
    if [ "$(cat -- "$tempfile")" != "$(echo -n `pwd`)" ]; then
        cd -- "$(cat "$tempfile")"
    fi
    rm -f -- "$tempfile"
}

# This binds Ctrl-O to ranger-cd:
bind '"\C-o":"ranger-cd\C-m"'