diff options
Diffstat (limited to '.config/zsh/.zshrc')
-rw-r--r-- | .config/zsh/.zshrc | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/.config/zsh/.zshrc b/.config/zsh/.zshrc index 6bb4380..94813e6 100644 --- a/.config/zsh/.zshrc +++ b/.config/zsh/.zshrc @@ -1,6 +1,45 @@ # Enable colors and change prompt: + autoload -U colors && colors # Load colors PS1="%B%{$fg[red]%}[%{$fg[yellow]%}%n%{$fg[green]%}@%{$fg[blue]%}%M %{$fg[magenta]%}%~%{$fg[red]%}]%{$reset_color%}$%b " setopt autocd # Automatically cd into typed directory. stty stop undef # Disable ctrl-s to freeze terminal. setopt interactive_comments + +HISTSIZE=10000000 +SAVEHIST=10000000 +HISTFILE="${XDG_CACHE_HOME:-$HOME/.cache}/zsh/history" +setopt append_history +setopt inc_append_history +setopt share_history +setopt hist_ignore_dups +setopt hist_ignore_all_dups +setopt hist_expire_dups_first +setopt hist_find_no_dups +setopt hist_save_no_dups +setopt hist_reduce_blanks +setopt hist_verify + +autoload -U compinit +zstyle ':completion:*' menu select +zmodload zsh/complist +compinit +_comp_options+=(globdots) # Include hidden files. + +source "/usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh" + +lfcd () { + tmp="$(mktemp -uq)" + trap 'rm -f $tmp >/dev/null 2>&1 && trap - HUP INT QUIT TERM PWR EXIT' HUP INT QUIT TERM PWR EXIT + lf -last-dir-path="$tmp" "$@" + if [ -f "$tmp" ]; then + dir="$(cat "$tmp")" + [ -d "$dir" ] && [ "$dir" != "$(pwd)" ] && cd "$dir" + fi +} +bindkey -s '^o' '^ulfcd\n' + +export GPG_TTY=$(tty) + +# Load syntax highlighting; should be last. +source /usr/share/zsh/plugins/fast-syntax-highlighting/fast-syntax-highlighting.plugin.zsh 2>/dev/null |