Add some more options for zsh

This commit is contained in:
2021-04-16 00:06:15 +01:00
parent 17a908604f
commit 3e6f3a1b3e
2 changed files with 25 additions and 1 deletions

View File

@@ -10,7 +10,15 @@ setopt interactive_comments
# History in cache directory:
HISTSIZE=10000000
SAVEHIST=10000000
HISTFILE=~/.cache/zsh/history
HISTFILE="${XDG_CACHE_HOME:-$HOME/.cache}/zsh/history"
[ ! -f $HISTFILE ] && mkdir "${XDG_CACHE_HOME:-$HOME/.cache}/zsh"; touch "$HISTFILE"
setopt share_history # Share histories between open sessions
setopt append_history # Append to history file instead of overriding
setopt inc_append_history # Append to history file as you go
setopt hist_ignore_dups # Ignore duplicates directly after each other
setopt hist_find_no_dups # Ignore duplicates when navigating up through history
setopt hist_no_store # Don't store `history` command
setopt hist_ignore_space # Allow using a space to not add the line to the history
# Load aliases and shortcuts if existent.
[ -f "${XDG_CONFIG_HOME:-$HOME/.config}/shell/shortcutrc" ] && source "${XDG_CONFIG_HOME:-$HOME/.config}/shell/shortcutrc"
@@ -71,6 +79,9 @@ bindkey -s '^f' 'cd "$(dirname "$(fzf)")"\n'
bindkey '^[[P' delete-char
bindkey '^[[A' history-search-backward
bindkey '^[[B' history-search-forward
setxkbmap gb
# Edit line in vim with ctrl-e: