2022-01-08 16:45:34 +00:00
|
|
|
stty -ixon # Disable ctrl-s and ctrl-q.
|
|
|
|
|
2021-12-07 16:53:57 +00:00
|
|
|
source "$HOME/.local/share/zinit/zinit.git/zinit.zsh"
|
|
|
|
autoload -Uz _zinit
|
|
|
|
(( ${+_comps} )) && _comps[zinit]=_zinit
|
|
|
|
|
2019-01-11 18:13:34 +00:00
|
|
|
# load modules
|
2021-12-07 16:53:57 +00:00
|
|
|
zinit light zsh-users/zsh-completions
|
2022-01-17 17:42:02 +00:00
|
|
|
zinit ice has'fzf'; zinit light Aloxaf/fzf-tab
|
2021-12-07 16:53:57 +00:00
|
|
|
zinit light zsh-users/zsh-autosuggestions
|
2022-01-08 16:27:40 +00:00
|
|
|
zinit light jeffreytse/zsh-vi-mode
|
2021-12-07 16:53:57 +00:00
|
|
|
|
2022-02-06 15:48:46 +00:00
|
|
|
zinit ice has'ssh-agent' wait lucid; zinit snippet OMZP::ssh-agent
|
|
|
|
|
2022-02-06 04:18:43 +00:00
|
|
|
# Load starship theme
|
|
|
|
zinit ice as"command" from"gh-r" \
|
|
|
|
atclone"./starship init zsh > init.zsh; ./starship completions zsh > _starship" \
|
|
|
|
atpull"%atclone" src"init.zsh"
|
|
|
|
zinit light starship/starship
|
2022-01-08 16:45:34 +00:00
|
|
|
|
2021-12-07 16:53:57 +00:00
|
|
|
zinit ice wait lucid
|
|
|
|
zinit light zdharma-continuum/fast-syntax-highlighting
|
|
|
|
|
2022-02-06 16:11:24 +00:00
|
|
|
zinit as"program" has'go' make'!' atclone'./direnv hook zsh > zhook.zsh' \
|
2022-02-06 15:28:12 +00:00
|
|
|
atpull'%atclone' pick"direnv" src"zhook.zsh" for \
|
|
|
|
direnv/direnv
|
2020-04-21 02:28:26 +00:00
|
|
|
|
2021-12-07 16:53:57 +00:00
|
|
|
zinit ice wait"1" lucid
|
|
|
|
zinit light chisui/zsh-nix-shell
|
|
|
|
|
2022-02-06 04:09:45 +00:00
|
|
|
zinit ice has'fzf' wait"" lucid; zinit snippet https://raw.githubusercontent.com/junegunn/fzf/master/shell/completion.zsh
|
|
|
|
zinit ice has'fzf' wait"" lucid; zinit snippet https://raw.githubusercontent.com/junegunn/fzf/master/shell/key-bindings.zsh
|
2021-12-09 20:23:54 +00:00
|
|
|
zinit ice wait"1" lucid
|
|
|
|
zinit snippet https://raw.githubusercontent.com/hkbakke/bash-insulter/master/src/bash.command-not-found
|
2021-12-07 16:53:57 +00:00
|
|
|
|
2018-02-01 22:34:24 +00:00
|
|
|
zstyle ':completion:*' completer _expand _complete _ignored _correct _approximate
|
|
|
|
zstyle ':completion:*' matcher-list 'm:{[:lower:][:upper:]}={[:upper:][:lower:]}' 'r:|[._-]=** r:|=**'
|
|
|
|
zstyle ':completion:*' max-errors 2
|
|
|
|
zstyle ':completion:*' menu select=1
|
2019-06-26 21:59:48 +00:00
|
|
|
zstyle ':completion:*' select-prompt %SScrolling active: current selection at %p%s zstyle :compinstall filename "${HOME}/.zshrc" zstyle ':completion:*' rehash true
|
2022-02-06 16:39:29 +00:00
|
|
|
zstyle ':completion::complete:*' use-cache 1
|
2018-02-01 22:34:24 +00:00
|
|
|
|
2018-05-19 17:39:06 +00:00
|
|
|
[[ $UID -eq 0 ]] || () {
|
|
|
|
local i
|
|
|
|
local -T SUDO_PATH sudo_path
|
|
|
|
local -U sudo_path
|
|
|
|
sudo_path=($path {,/usr{,/local}}/sbin(N-/))
|
2019-06-26 22:10:41 +00:00
|
|
|
for i in sudo{,x} su{,x} doas{,x}
|
2018-05-19 17:39:06 +00:00
|
|
|
do zstyle ":completion:*:$i:*" environ PATH="$SUDO_PATH"
|
|
|
|
done
|
|
|
|
}
|
|
|
|
|
2019-08-25 09:49:08 +00:00
|
|
|
export HISTFILE=~/.histfile
|
2022-01-17 17:11:09 +00:00
|
|
|
export HISTSIZE=100000
|
|
|
|
export SAVEHIST=100000
|
2022-02-06 16:08:50 +00:00
|
|
|
|
|
|
|
setopt appendhistory notify histexpiredupsfirst histsavenodups incappendhistorytime histnostore histignorespace
|
2018-02-01 22:34:24 +00:00
|
|
|
unsetopt beep
|
|
|
|
|
2022-02-06 16:04:06 +00:00
|
|
|
export FZF_DEFAULT_OPTS="-m"
|
|
|
|
command -v fd > /dev/null && export FZF_DEFAULT_COMMAND="fd"
|
2018-12-31 02:06:48 +00:00
|
|
|
|
2018-02-02 16:12:44 +00:00
|
|
|
alias dots="git --git-dir=$HOME/.dots --work-tree=$HOME"
|
2019-06-26 21:59:48 +00:00
|
|
|
alias dotmodules="dots submodule update --recursive --remote"
|
2021-02-28 15:55:31 +00:00
|
|
|
alias venv="source ~/.venvs/venv/bin/activate"
|
2021-12-08 18:46:06 +00:00
|
|
|
alias ytdl="yt-dlp"
|
2021-04-08 01:22:34 +00:00
|
|
|
alias ag="ag --nogroup"
|
2020-01-30 20:05:57 +00:00
|
|
|
alias s="vi ~/.local/bin/\$(stest -lx ~/.local/bin | fzf --tac -e)"
|
2020-01-19 10:11:28 +00:00
|
|
|
alias ffmpeg="ffmpeg -hide_banner"
|
2020-04-04 00:50:38 +00:00
|
|
|
alias ffprobe="ffprobe -hide_banner"
|
2020-01-19 10:11:28 +00:00
|
|
|
|
2018-12-31 14:43:18 +00:00
|
|
|
[ -f ~/.zshrc.local ] && . ~/.zshrc.local
|
2021-12-07 16:53:57 +00:00
|
|
|
|
|
|
|
autoload -Uz compinit && compinit
|
|
|
|
autoload -U +X bashcompinit && bashcompinit && complete -o bashdefault -o default -o nospace -C qpdf qpdf
|
|
|
|
|
|
|
|
zinit cdreplay -q
|