dotfiles/zsh/.zshrc
2019-11-19 01:16:15 +01:00

39 lines
1.2 KiB
Bash

if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi
source "$ZDOTDIR/libraries/export.zsh"
source "$ZDOTDIR/libraries/dircolor.zsh"
source "/usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh"
source "/usr/share/zsh-theme-powerlevel10k/powerlevel10k.zsh-theme"
autoload -Uz compinit
if [[ -n $HOME/.cache/zsh/compdump(#qN.mh+24) ]]; then
compinit -d $HOME/.cache/zsh/compdump
else
compinit -d $HOME/.cache/zsh/compdump -C
fi
for file in $ZDOTDIR/libraries/source/*.zsh; do source "$file"; done
for file in $ZDOTDIR/libraries/plugins/*.zsh; do source "$file"; done
source "/usr/share/fzf/completion.zsh"
source "/usr/share/fzf/key-bindings.zsh"
source "/usr/share/doc/pkgfile/command-not-found.zsh"
# Use lf to switch directories and bind it to ctrl-o
lfcd () {
tmp="$(mktemp)"
lf -last-dir-path="$tmp" "$@"
if test -f "$tmp"; then
dir="$(cat "$tmp")"
rm -f "$tmp"
[ -d "$dir" ] && [ "$dir" != "$(pwd)" ] && cd "$dir"
fi
}
bindkey -s '^o' 'lfcd\n'
[[ ! -f $ZDOTDIR/.p10k.zsh ]] || source $ZDOTDIR/.p10k.zsh
source "/usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh"