From 58dbef0f4c9b483070f21df665e86ed63f7388ad Mon Sep 17 00:00:00 2001 From: Stefan Huber Date: Wed, 10 Feb 2021 21:58:49 +0100 Subject: [PATCH] zsh: Whitespace editing --- dotfiles/shell/.zshrc | 56 +++++++++++++++++++++---------------------- 1 file changed, 27 insertions(+), 29 deletions(-) diff --git a/dotfiles/shell/.zshrc b/dotfiles/shell/.zshrc index 1b74f6d..4e135a9 100644 --- a/dotfiles/shell/.zshrc +++ b/dotfiles/shell/.zshrc @@ -14,7 +14,7 @@ zstyle ':completion::complete:*' use-cache 1 autoload colors zsh/terminfo if [[ "$terminfo[colors]" -ge 8 ]]; then - colors + colors fi eval `dircolors` @@ -54,14 +54,14 @@ bindkey "\e[8~" end-of-line setopt \ - EXTENDEDGLOB \ - BASH_AUTO_LIST \ - LIST_AMBIGUOUS \ - CHECK_JOBS \ - INC_APPEND_HISTORY \ - HIST_IGNORE_DUPS \ - HIST_IGNORE_SPACE \ - NO_HUP + EXTENDEDGLOB \ + BASH_AUTO_LIST \ + LIST_AMBIGUOUS \ + CHECK_JOBS \ + INC_APPEND_HISTORY \ + HIST_IGNORE_DUPS \ + HIST_IGNORE_SPACE \ + NO_HUP HISTFILE=~/.zsh_history @@ -78,13 +78,13 @@ zstyle ':vcs_info:*' max-exports 1 function setprompt() { - # default: " (%s)-[%b|%a]%u%c-" - zstyle ':vcs_info:*' actionformats " %s: %b|%a" - # default: " (%s)-[%b]%u%c-" - zstyle ':vcs_info:*' formats " %s: %b" + # default: " (%s)-[%b|%a]%u%c-" + zstyle ':vcs_info:*' actionformats " %s: %b|%a" + # default: " (%s)-[%b]%u%c-" + zstyle ':vcs_info:*' formats " %s: %b" - setopt PROMPT_SUBST - PROMPT=' + setopt PROMPT_SUBST + PROMPT=' %(!.%{$fg_bold[red]%}.%{$fg_bold[green]%})%n@%m%{$reset_color%}$PR_SCREEN$PR_JOBS%{$fg_bold[yellow]%}${vcs_info_msg_0_}%{$reset_color%} %{$fg_bold[blue]%}%~%{$reset_color%} $PR_EXIT%# ' } @@ -96,7 +96,7 @@ autofs_mp=() function precmd () { - PR_EXIT="%{$fg_bold[red]%}%(?..[%?] )%{$reset_color%}" + PR_EXIT="%{$fg_bold[red]%}%(?..[%?] )%{$reset_color%}" # Check whether current directory is a subdirectory of an autofs mountpoint local parent="0" @@ -107,11 +107,12 @@ function precmd () parent="1" # Even equal! if echo "$mp" | /bin/grep -q $PWD; then - vcs_info_msg_0_=" [autofs]" + vcs_info_msg_0_=" [autofs]" fi break; fi done + if [ -z "$vcs_info_msg_0_" ]; then if [ "$parent" = "1" ]; then # svn and hg cause complaints of autofs that .svn and .hg is no mount point @@ -119,20 +120,17 @@ function precmd () else zstyle ':vcs_info:*' enable git cvs svn hg fi - vcs_info + vcs_info fi - PR_SCREEN="" - if [[ -n "${WINDOW}" ]]; then - PR_SCREEN=" S:${WINDOW}" - fi + PR_SCREEN="" + if [[ -n "${WINDOW}" ]]; then + PR_SCREEN=" S:${WINDOW}" + fi - PR_JOBS="" - if [[ $(jobs | wc -l) -gt 0 ]]; then - PR_JOBS=" J:%j" - fi + PR_JOBS="" + if [[ $(jobs | wc -l) -gt 0 ]]; then + PR_JOBS=" J:%j" + fi } - - - -- 2.39.5