mirror of
https://github.com/pratiktri/dotfiles.git
synced 2026-02-04 16:41:43 +05:30
fix: ZSH: per-directory-history plugin issue fix
fix: ZSH: dump file on home directory removed
This commit is contained in:
@@ -5,6 +5,7 @@
|
|||||||
# ZSH Options
|
# ZSH Options
|
||||||
bindkey -v # enable vi-mode
|
bindkey -v # enable vi-mode
|
||||||
setopt +o nomatch
|
setopt +o nomatch
|
||||||
|
ZSH_STATE_HOME="$XDG_STATE_HOME/shell"
|
||||||
|
|
||||||
ZSH_THEME="powerlevel10k/powerlevel10k"
|
ZSH_THEME="powerlevel10k/powerlevel10k"
|
||||||
CASE_SENSITIVE="true"
|
CASE_SENSITIVE="true"
|
||||||
@@ -15,7 +16,7 @@ HIST_STAMPS="dd.mm.yyyy" # see 'man strftime' for details.
|
|||||||
# ZSH History
|
# ZSH History
|
||||||
export HISTSIZE=10000000
|
export HISTSIZE=10000000
|
||||||
export SAVEHIST=$HISTSIZE
|
export SAVEHIST=$HISTSIZE
|
||||||
export HISTFILE="$XDG_STATE_HOME/shell/zsh_history"
|
export HISTFILE="$ZSH_STATE_HOME/zsh_history"
|
||||||
setopt appendhistory # Append rather than overwriting
|
setopt appendhistory # Append rather than overwriting
|
||||||
setopt sharehistory # Share history between all sessions.
|
setopt sharehistory # Share history between all sessions.
|
||||||
setopt extended_history # Write the history file in the ":start:elapsed;command" format.
|
setopt extended_history # Write the history file in the ":start:elapsed;command" format.
|
||||||
@@ -45,7 +46,7 @@ TIMER_PRECISION=3; TIMER_FORMAT='[%d]'
|
|||||||
VI_MODE_SET_CURSOR=true
|
VI_MODE_SET_CURSOR=true
|
||||||
VI_MODE_CURSOR_INSERT=3
|
VI_MODE_CURSOR_INSERT=3
|
||||||
# Having HISTORY_BASE after per-directory-history plugin install does NOT work
|
# Having HISTORY_BASE after per-directory-history plugin install does NOT work
|
||||||
HISTORY_BASE="$XDG_STATE_HOME/shell/per-directory-history"
|
HISTORY_BASE="$ZSH_STATE_HOME/per-directory-history"
|
||||||
|
|
||||||
# Zinit Plugins
|
# Zinit Plugins
|
||||||
zinit ice depth=1; zinit light romkatv/powerlevel10k
|
zinit ice depth=1; zinit light romkatv/powerlevel10k
|
||||||
@@ -80,8 +81,10 @@ zi ice as"completion"
|
|||||||
zi snippet OMZP::fd/_fd
|
zi snippet OMZP::fd/_fd
|
||||||
|
|
||||||
# ZSH Auto-completion settings
|
# ZSH Auto-completion settings
|
||||||
|
[ -d "${XDG_CACHE_HOME}/zsh" ] || mkdir -p "${XDG_CACHE_HOME}/zsh"
|
||||||
|
ZCOMP_CACHE_FILE="${XDG_CACHE_HOME}/zsh/zcompcache"
|
||||||
autoload -Uz compinit
|
autoload -Uz compinit
|
||||||
compinit -d "$XDG_CACHE_HOME/zsh/zcompdump-$ZSH_VERSION"
|
compinit -d "${XDG_CACHE_HOME}/zsh/zcompdump-${ZSH_VERSION}"
|
||||||
_comp_options+=(globdots) # Include hidden files
|
_comp_options+=(globdots) # Include hidden files
|
||||||
zmodload zsh/complist
|
zmodload zsh/complist
|
||||||
zinit cdreplay -q
|
zinit cdreplay -q
|
||||||
@@ -89,7 +92,8 @@ zinit cdreplay -q
|
|||||||
# Completion styling
|
# Completion styling
|
||||||
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-z}' # Case INsensitive completion match
|
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-z}' # Case INsensitive completion match
|
||||||
zstyle ':completion:*' list-colors "${(s.:.)LS_COLORS}" # Add color to completion suggestions
|
zstyle ':completion:*' list-colors "${(s.:.)LS_COLORS}" # Add color to completion suggestions
|
||||||
zstyle ':completion::complete:*' gain-privileges 1 menu select cache-path "$XDG_CACHE_HOME/zsh/zcompcache"
|
zstyle ':completion:*' cache-path "$ZCOMP_CACHE_FILE"
|
||||||
|
zstyle ':completion::complete:*' gain-privileges 1 menu select cache-path "$ZCOMP_CACHE_FILE"
|
||||||
|
|
||||||
# To customize prompt, run `p10k configure`
|
# To customize prompt, run `p10k configure`
|
||||||
[[ ! -f "$XDG_CONFIG_HOME/shell/p10k.zsh" ]] || source "$XDG_CONFIG_HOME/shell/p10k.zsh"
|
[[ ! -f "$XDG_CONFIG_HOME/shell/p10k.zsh" ]] || source "$XDG_CONFIG_HOME/shell/p10k.zsh"
|
||||||
|
|||||||
@@ -10,8 +10,6 @@ dir_size(){
|
|||||||
|
|
||||||
du -ah "$dir" --max-depth=1 | sort -hr
|
du -ah "$dir" --max-depth=1 | sort -hr
|
||||||
}
|
}
|
||||||
alias tldr="tldr --platform=linux "
|
|
||||||
|
|
||||||
|
|
||||||
# Network
|
# Network
|
||||||
alias flush-dns="sudo systemd-resolve --flush-caches"
|
alias flush-dns="sudo systemd-resolve --flush-caches"
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ dir_size() {
|
|||||||
|
|
||||||
du -ah "$dir" -d 1 | sort -hr
|
du -ah "$dir" -d 1 | sort -hr
|
||||||
}
|
}
|
||||||
alias tldr="tldr --platform=osx "
|
|
||||||
|
|
||||||
# Update & Upgrades
|
# Update & Upgrades
|
||||||
alias up="brew upgrade --cask && brew upgrade --formula && brew autoremove && brew cleanup && rustup update && npm update -g"
|
alias up="brew upgrade --cask && brew upgrade --formula && brew autoremove && brew cleanup && rustup update && npm update -g"
|
||||||
|
|||||||
Reference in New Issue
Block a user