You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
# Use ranger to switch directories and bind it to ctrl-o |
|
rangercd () { |
|
tmp="$(mktemp)" |
|
ranger --choosedir="$tmp" "$@" |
|
if [ -f "$tmp" ]; then |
|
dir="$(cat "$tmp")" |
|
rm -f "$tmp" |
|
[ -d "$dir" ] && [ "$dir" != "$(pwd)" ] && cd "$dir" |
|
fi |
|
} |
|
alias ranger="rangercd" |
|
#bindkey -s '^o' 'ranger\n'
|
|
|