diff --git a/zsh/zsh-common b/.zshrc similarity index 64% rename from zsh/zsh-common rename to .zshrc index d87c117..eb63c52 100644 --- a/zsh/zsh-common +++ b/.zshrc @@ -1,8 +1,32 @@ +# Lines configured by zsh-newuser-install +HISTFILE=~/.histfile +HISTSIZE=1000 +SAVEHIST=1000 +setopt appendhistory +bindkey -e +# End of lines configured by zsh-newuser-install +# The following lines were added by compinstall +zstyle :compinstall filename '/home/gshipunov/.zshrc' + +autoload -Uz compinit +compinit +# End of lines added by compinstall + +# pager +export PAGER="less --quit-if-one-screen" + # Edit the command in editor autoload -z edit-command-line zle -N edit-command-line bindkey "^X^E" edit-command-line +# Prompt +if [[ -n $SSH_CONNECTION ]]; then + HOST_LBL="%F{red}[%m]%f" +fi + +PROMPT="%B%(?..%F{red}[%?]%f)$HOST_LBL%(!.%F{red}[%n]%f.)%F{cyan}%~%(!.%F{red}.%F{green})%# %f%b" + #### Aliases # add some color alias grep="grep --color" @@ -18,9 +42,6 @@ alias l.="ls -d .*" alias e=$EDITOR alias v=$VISUAL -# pager -export PAGER="less --quit-if-one-screen" - # platform-specific config unamestr=$(uname 2> /dev/null) case "$unamestr" in diff --git a/zsh/zshrc b/zsh/zshrc deleted file mode 100644 index 4ec1f5d..0000000 --- a/zsh/zshrc +++ /dev/null @@ -1,22 +0,0 @@ -# Lines configured by zsh-newuser-install -HISTFILE=~/.histfile -HISTSIZE=1000 -SAVEHIST=1000 -setopt appendhistory -bindkey -e -# End of lines configured by zsh-newuser-install -# The following lines were added by compinstall -zstyle :compinstall filename '/home/gshipunov/.zshrc' - -autoload -Uz compinit -compinit -# End of lines added by compinstall - -# Prompt -if [[ -n $SSH_CONNECTION ]]; then - HOST_LBL="%F{red}[%m]%f" -fi - -PROMPT="%B%(?..%F{red}[%?]%f)$HOST_LBL%(!.%F{red}[%n]%f.)%F{cyan}%~%(!.%F{red}.%F{green})%# %f%b" - -source ./common diff --git a/zsh/zshrc-ohmyzsh b/zsh/zshrc-ohmyzsh deleted file mode 100644 index d7120f4..0000000 --- a/zsh/zshrc-ohmyzsh +++ /dev/null @@ -1,29 +0,0 @@ - -# Path to your oh-my-zsh installation. -export ZSH="/home/gshipunov/.oh-my-zsh" - -ZSH_THEME="sunrise" - -DISABLE_AUTO_UPDATE="true" -# export UPDATE_ZSH_DAYS=13 - -# Uncomment the following line if pasting URLs and other text is messed up. -# DISABLE_MAGIC_FUNCTIONS="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" - -# see 'man strftime' for details. -HIST_STAMPS="yyyy-mm-dd" - -plugins=(colorize colored-man-pages) - -source $ZSH/oh-my-zsh.sh - -# User configuration -export DOTFILES=$HOME/.files -source $DOTFILES/zsh/zsh-common -# hook direnv in -eval "$(direnv hook zsh)"