aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAryadev Chavali <aryadev@aryadevchavali.com>2021-07-28 19:18:21 +0100
committerAryadev Chavali <aryadev@aryadevchavali.com>2021-07-28 19:18:21 +0100
commit30705789d157e40cc4567902176cbc8d3df0367c (patch)
tree14e099b604cd535438aea47447a535fdeb522cb2
parentf3436334d870f7b99f5d90875a36d34661aaa45f (diff)
downloaddotfiles-30705789d157e40cc4567902176cbc8d3df0367c.tar.gz
dotfiles-30705789d157e40cc4567902176cbc8d3df0367c.tar.bz2
dotfiles-30705789d157e40cc4567902176cbc8d3df0367c.zip
(Shell)+hlight alias+a ton of options for history in zsh
hlight alias highlights words via grep. Basic usage is for files but can also be used for piped input. Just a bit nicer to use. zsh history management makes zsh-fish-autocomplete an even more powerful tool (as it now has a giant history to read through instead of just a local history)
-rw-r--r--Shell/.zshrc19
1 files changed, 16 insertions, 3 deletions
diff --git a/Shell/.zshrc b/Shell/.zshrc
index b663f9f..64453e3 100644
--- a/Shell/.zshrc
+++ b/Shell/.zshrc
@@ -14,6 +14,7 @@ alias paste="xclip -o"
alias md="mkdir"
alias ls="ls --color"
alias l="ls -la"
+alias hlight="grep -i -C10 --color=always"
alias fzf="fd --hidden | fzf --layout=reverse --height=20"
alias suctl="systemctl --user"
alias sedit="emacsclient -s MAIN -a emacs -c"
@@ -45,10 +46,22 @@ setopt autocd
export ZSH_THEME="af-magic"
PS1="%B%F{128}(%n@%m)%B%F{64}[%(4~|...|)%3~]
%F{white}>> %b%f%k"
-setopt histignorealldups sharehistory
-HISTSIZE=10000
-SAVEHIST=10000
+setopt BANG_HIST
+setopt EXTENDED_HISTORY
+setopt INC_APPEND_HISTORY
+setopt SHARE_HISTORY
+setopt HIST_EXPIRE_DUPS_FIRST
+setopt HIST_IGNORE_DUPS
+setopt HIST_IGNORE_ALL_DUPS
+setopt HIST_FIND_NO_DUPS
+setopt HIST_IGNORE_SPACE
+setopt HIST_SAVE_NO_DUPS
+setopt HIST_REDUCE_BLANKS
+setopt HIST_VERIFY
+HISTFILE="$HOME/.zsh_history"
+HISTSIZE=1000000000
+SAVEHIST=$HISTSIZE
zstyle ':completion:*' menu select
zmodload zsh/complist
compinit