From cd8c93a206836b179695ea6b0fa9ae1223de4362 Mon Sep 17 00:00:00 2001 From: surtur Date: Fri, 8 Sep 2023 14:21:08 +0200 Subject: [PATCH] zshrc: split omz code into its own file --- .zsh/omz.zsh | 74 +++++++++++++++++++++++++++++++++++++++++++++++++++ .zshrc | 75 +--------------------------------------------------- 2 files changed, 75 insertions(+), 74 deletions(-) create mode 100644 .zsh/omz.zsh diff --git a/.zsh/omz.zsh b/.zsh/omz.zsh new file mode 100644 index 0000000..9781677 --- /dev/null +++ b/.zsh/omz.zsh @@ -0,0 +1,74 @@ +# Uncomment the following line to use case-sensitive completion. +# CASE_SENSITIVE="true" + +# Uncomment the following line to use hyphen-insensitive completion. Case +# sensitive completion must be off. _ and - will be interchangeable. +HYPHEN_INSENSITIVE="true" + +zstyle ':omz:update' mode disabled +zstyle ':omz:update' frequency 3 # days + +# Uncomment the following line to disable colors in ls. +DISABLE_LS_COLORS="true" + +DISABLE_MAGIC_FUNCTIONS="false" + +# Uncomment the following line to disable auto-setting terminal title. +DISABLE_AUTO_TITLE="false" + +# Uncomment the following line to enable command auto-correction. +ENABLE_CORRECTION="false" + +# Uncomment the following line to display red dots whilst waiting for completion. +COMPLETION_WAITING_DOTS="true" + +# Uncomment the following line if you want to disable marking untracked files +# under VCS as dirty. This makes repository status check for large repositories +# much, much faster. +DISABLE_UNTRACKED_FILES_DIRTY="true" + +MAILCHECK=0 + +# allow tab completion in the middle of a word +setopt COMPLETE_IN_WORD +# keep backgroud processess at full speed +setopt NOBGNICE + +# Uncomment the following line if you want to change the command execution time +# stamp shown in the history command output. +# The optional three formats: "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd" +HIST_STAMPS="yyyy-mm-dd" +HISTSIZE=10000000 +SAVEHIST=10000000 +setopt inc_append_history +setopt extended_history # write the history file in the ":start:elapsed;command" format +setopt share_history +setopt hist_expire_dups_first # expire duplicate entries first when trimming history +setopt hist_ignore_dups +setopt hist_ignore_all_dups +setopt hist_save_no_dups +setopt hist_ignore_space +setopt hist_reduce_blanks # remove superfluous blanks before recording entry +setopt hist_verify # don't execute immediately after expansion +# HISTCONTROL=ignoredups:erasedups + +# don't expand aliases _before_ completion has finished +# like: git comm-[tab] +# setopt complete_aliases # THIS HAS ISSUES + +# Would you like to use another custom folder than $ZSH/custom? +# ZSH_CUSTOM=/path/to/new-custom-folder + +plugins=( + git + gitignore + golang + safe-paste + ssh-agent + systemd + terraform + lol + colored-man-pages +) + +source $ZSH/oh-my-zsh.sh diff --git a/.zshrc b/.zshrc index 7d61bb1..edb788e 100644 --- a/.zshrc +++ b/.zshrc @@ -27,81 +27,8 @@ FAST_HIGHLIGHT[chroma-cabal]=0 FAST_HIGHLIGHT[chroma-exercism]=0 + test -f ~/.zsh/omz.zsh && source ~/.zsh/omz.zsh -# Uncomment the following line to use case-sensitive completion. -# CASE_SENSITIVE="true" - -# Uncomment the following line to use hyphen-insensitive completion. Case -# sensitive completion must be off. _ and - will be interchangeable. - HYPHEN_INSENSITIVE="true" - - zstyle ':omz:update' mode disabled - zstyle ':omz:update' frequency 3 # days - -# Uncomment the following line to disable colors in ls. - DISABLE_LS_COLORS="true" - - DISABLE_MAGIC_FUNCTIONS="false" - -# Uncomment the following line to disable auto-setting terminal title. - DISABLE_AUTO_TITLE="false" - -# Uncomment the following line to enable command auto-correction. - ENABLE_CORRECTION="false" - -# Uncomment the following line to display red dots whilst waiting for completion. - COMPLETION_WAITING_DOTS="true" - -# Uncomment the following line if you want to disable marking untracked files -# under VCS as dirty. This makes repository status check for large repositories -# much, much faster. - DISABLE_UNTRACKED_FILES_DIRTY="true" - - MAILCHECK=0 - - # allow tab completion in the middle of a word - setopt COMPLETE_IN_WORD - # keep backgroud processess at full speed - setopt NOBGNICE - - # Uncomment the following line if you want to change the command execution time - # stamp shown in the history command output. - # The optional three formats: "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd" - HIST_STAMPS="yyyy-mm-dd" - HISTSIZE=10000000 - SAVEHIST=10000000 - setopt inc_append_history - setopt extended_history # write the history file in the ":start:elapsed;command" format - setopt share_history - setopt hist_expire_dups_first # expire duplicate entries first when trimming history - setopt hist_ignore_dups - setopt hist_ignore_all_dups - setopt hist_save_no_dups - setopt hist_ignore_space - setopt hist_reduce_blanks # remove superfluous blanks before recording entry - setopt hist_verify # don't execute immediately after expansion - # HISTCONTROL=ignoredups:erasedups - - # don't expand aliases _before_ completion has finished - # like: git comm-[tab] - # setopt complete_aliases # THIS HAS ISSUES - -# Would you like to use another custom folder than $ZSH/custom? -# ZSH_CUSTOM=/path/to/new-custom-folder - - plugins=( - git - gitignore - golang - safe-paste - ssh-agent - systemd - terraform - lol - colored-man-pages - ) - - source $ZSH/oh-my-zsh.sh ZSH_HIGHLIGHT_HIGHLIGHTERS=(main brackets pattern) ZSH_AUTOSUGGEST_STRATEGY=(history completion)