Update .zshrc

This commit is contained in:
Vlad Doster 2019-12-22 23:22:46 -05:00 committed by GitHub
parent 55063c9079
commit 5ecc4c45a8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -50,22 +50,13 @@ echo -ne '\e[5 q'
# Use beam shape cursor for each new prompt. # Use beam shape cursor for each new prompt.
preexec() { echo -ne '\e[5 q' ;} preexec() { echo -ne '\e[5 q' ;}
# Use lf to switch directories and bind it to ctrl-o ranger() {
lfcd () { if [ -z "$RANGER_LEVEL" ]; then
tmp="$(mktemp)" /usr/bin/ranger "$@"
lf -last-dir-path="$tmp" "$@" else
if [ -f "$tmp" ]; then exit
dir="$(cat "$tmp")"
rm -f "$tmp"
if [ -d "$dir" ]; then
if [ "$dir" != "$(pwd)" ]; then
cd "$dir"
fi
fi
fi fi
} }
bindkey -s '^o' 'lfcd\n' # zsh
# Load zsh-syntax-highlighting; should be last. # Load zsh-syntax-highlighting; should be last.
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh 2>/dev/null source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh 2>/dev/null