chore(zsh): idiomatic order for .zshrc
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -16,7 +16,6 @@ zsh/*
|
|||||||
!zsh/.zshrc
|
!zsh/.zshrc
|
||||||
!zsh/.zshenv
|
!zsh/.zshenv
|
||||||
!zsh/.zprofile
|
!zsh/.zprofile
|
||||||
!zsh/.zsh_plugins*.txt
|
|
||||||
!zsh/scripts.zsh
|
!zsh/scripts.zsh
|
||||||
!zsh/aliases.zsh
|
!zsh/aliases.zsh
|
||||||
!zsh/ssh-menu
|
!zsh/ssh-menu
|
||||||
|
|||||||
27
zsh/.zshrc
27
zsh/.zshrc
@@ -1,3 +1,10 @@
|
|||||||
|
# shell options
|
||||||
|
unsetopt autocd # don't cd into directories by name
|
||||||
|
setopt NO_BEEP # no terminal bell
|
||||||
|
setopt AUTO_PUSHD # cd pushes to directory stack
|
||||||
|
setopt PUSHD_IGNORE_DUPS # no duplicates in directory stack
|
||||||
|
setopt EXTENDED_GLOB # enable extended glob operators (#, ~, ^)
|
||||||
|
|
||||||
# history
|
# history
|
||||||
HISTFILE="$XDG_STATE_HOME/zsh/history"
|
HISTFILE="$XDG_STATE_HOME/zsh/history"
|
||||||
HISTSIZE=10000
|
HISTSIZE=10000
|
||||||
@@ -7,9 +14,6 @@ setopt HIST_IGNORE_SPACE # skip commands starting with space
|
|||||||
setopt SHARE_HISTORY # share history across sessions
|
setopt SHARE_HISTORY # share history across sessions
|
||||||
setopt HIST_REDUCE_BLANKS # strip extra whitespace
|
setopt HIST_REDUCE_BLANKS # strip extra whitespace
|
||||||
|
|
||||||
# gnupg
|
|
||||||
export GPG_TTY=$(tty)
|
|
||||||
|
|
||||||
# plugins
|
# plugins
|
||||||
local _plugins="$XDG_DATA_HOME/zsh/plugins"
|
local _plugins="$XDG_DATA_HOME/zsh/plugins"
|
||||||
local _stamp="$XDG_CACHE_HOME/zsh/plugins-updated"
|
local _stamp="$XDG_CACHE_HOME/zsh/plugins-updated"
|
||||||
@@ -38,17 +42,7 @@ fpath=("$_plugins/zsh-completions/src" $fpath)
|
|||||||
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=#ffffff,bg=cyan,bold,underline"
|
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=#ffffff,bg=cyan,bold,underline"
|
||||||
source "$_plugins/zsh-autosuggestions/zsh-autosuggestions.zsh"
|
source "$_plugins/zsh-autosuggestions/zsh-autosuggestions.zsh"
|
||||||
|
|
||||||
# shell options
|
# aliases and functions
|
||||||
unsetopt autocd # don't cd into directories by name
|
|
||||||
setopt NO_BEEP # no terminal bell
|
|
||||||
setopt AUTO_PUSHD # cd pushes to directory stack
|
|
||||||
setopt PUSHD_IGNORE_DUPS # no duplicates in directory stack
|
|
||||||
setopt EXTENDED_GLOB # enable extended glob operators (#, ~, ^)
|
|
||||||
|
|
||||||
# ggman
|
|
||||||
eval "$(ggman shellrc)"
|
|
||||||
|
|
||||||
# custom functions and aliases
|
|
||||||
source "$ZDOTDIR/aliases.zsh"
|
source "$ZDOTDIR/aliases.zsh"
|
||||||
source "$ZDOTDIR/scripts.zsh"
|
source "$ZDOTDIR/scripts.zsh"
|
||||||
|
|
||||||
@@ -66,5 +60,10 @@ zstyle ':completion:*' cache-path "$XDG_CACHE_HOME/zsh/zcompcache"
|
|||||||
zstyle ':completion:*' menu select
|
zstyle ':completion:*' menu select
|
||||||
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}'
|
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}'
|
||||||
|
|
||||||
|
# tool hooks
|
||||||
|
eval "$(ggman shellrc)"
|
||||||
eval "$(starship init zsh)"
|
eval "$(starship init zsh)"
|
||||||
eval "$(direnv hook zsh)"
|
eval "$(direnv hook zsh)"
|
||||||
|
|
||||||
|
# gnupg
|
||||||
|
export GPG_TTY=$(tty)
|
||||||
|
|||||||
Reference in New Issue
Block a user