Lots of zsh changes

This commit is contained in:
Jonathan Hodgson 2020-03-11 11:30:54 +00:00
parent cd61fb7ff4
commit 4893824aff
15 changed files with 817 additions and 158 deletions

View file

@ -0,0 +1,12 @@
# 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'