aboutsummaryrefslogtreecommitdiff
path: root/config/zsh/zshrc
blob: 806697d175a654d3b8ac3195a67d62314d7dbe22 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
autoload -U colors && colors;
setopt auto_cd;
setopt inc_append_history;

export LESS="-R --chop-long-lines" # less no wrapping
export MANPAGER="nvim +Man\!" # man pager with nvim

export SAVEHIST=10000
# export HISTSIZE=50000
# export HISTFILE=~/.config/zsh_history

setopt extended_history       # record timestamp of command in HISTFILE
setopt hist_expire_dups_first # delete duplicates first when HISTFILE size exceeds HISTSIZE
setopt hist_ignore_dups       # ignore duplicated commands history list
setopt hist_save_no_dups
setopt hist_find_no_dups
setopt hist_ignore_space      # ignore commands that start with space
setopt hist_verify            # show command with history expansion to user before running it
setopt share_history          # share command history data

export ZSH_CUSTOM_CONF_FILES="$HOME/.config/zsh";

for f in $ZSH_CUSTOM_CONF_FILES/*.zsh; do source $f; done;
source $ZSH_CUSTOM_CONF_FILES/aliases.zsh;

# Direnv setup
if [[ "$DIRENV_DISABLE_HOOK" != "1" ]]; then
  eval "$(direnv hook zsh)"
fi;

# FZF integration
source <(fzf --zsh);

# Plugins
# source ~/.config/zshplugins/zsh-autosuggestions/zsh-autosuggestions.plugin.zsh;