From b87dcd1cf309db5748468f3bde978a0f8d6e736f Mon Sep 17 00:00:00 2001 From: Ivan Bushchik Date: Tue, 7 Feb 2023 14:44:12 +0300 Subject: [PATCH] Change .zshrc Signed-off-by: Ivan Bushchik --- configs/.zshrc | 30 ++++++++++++++++++++++++++++-- tools/link_env.sh | 0 2 files changed, 28 insertions(+), 2 deletions(-) mode change 100644 => 100755 tools/link_env.sh diff --git a/configs/.zshrc b/configs/.zshrc index 0f76165..6e4b273 100644 --- a/configs/.zshrc +++ b/configs/.zshrc @@ -1,14 +1,40 @@ +#!/bin/zsh + +# Setup function, that resets terminal + +autoload -Uz add-zsh-hook +function reset_broken_terminal () { + printf '%b' '\e[0m\e(B\e)0\017\e[?5l\e7\e[0;0r\e8' +} +add-zsh-hook -Uz precmd reset_broken_terminal export ZSH="$HOME/.dotfiles/zsh" -export HISTSIZE=10000 -export SAVEHIST=10000 + +# Setup history + +HISTFILE="$HOME/.zsh_history" +HISTSIZE=10000 +SAVEHIST=10000 +bindkey '\e[A' history-search-backward +bindkey '\e[B' history-search-forward setopt HIST_IGNORE_ALL_DUPS setopt HIST_FIND_NO_DUPS + REPORTTIME=3 +autoload -Uz compinit promptinit +compinit +promptinit +zstyle ':completion:*' menu select + +# Source section + source $HOME/.profile source $ZSH/themes/ivabus.zsh-theme source $ZSH/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh + +# Alias section + alias vi="nvim" alias vim="nvim" alias ls="ls --color=always" diff --git a/tools/link_env.sh b/tools/link_env.sh old mode 100644 new mode 100755