My zsh configuration
git clone https://github.com/m-col/zshrc
Files | Refs | Readme

Commit 92954c191e57533b00951b7409b2ce1fb8fed0d7
Parent: 7c630d03f9eb8f8231008d2969c6a87230437f1d
Author: mcol <mcol@posteo.net>
Date: 2019-02-21 21:17:52 +0000
Committer: mcol <mcol@posteo.net>
Committed: 2019-02-21 21:17:52 +0000

clean up tmux variable and zshrc

zshrc Modified

@@ -2,10 +2,18 @@
 # zshrc
 #
 
-if [ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ]; then
-    export is_ssh=true
+if [ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ]
+then
+    export IS_SSH=true
 else
-    export is_ssh=false
+    export IS_SSH=false
+fi
+
+if [[ -n "$TMUX" ]]
+then
+    export IS_TMUX=true
+else
+    export IS_TMUX=false
 fi
 
 ZSH="$HOME/.zsh"
@@ -20,7 +28,6 @@
     source $plugin
 done
 
-
 so () { [[ -e $1 ]] && source $1 }
 
 so $ZSH/aliases	    # general aliases
@@ -35,12 +42,15 @@
 ZSH_HIGHLIGHT_HIGHLIGHTERS=(main brackets)
 so $ZSH/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
 
+export SUDO_EDITOR=vim
+export EDITOR=vim
 
 # Ensure that the prompt is redrawn when the terminal size changes.
-TRAPWINCH () {
-    zle &&  zle -R
-}
+TRAPWINCH () { zle &&  zle -R }
 
 # these are needed for some unicode to work (e.g. in tmux)
 export LANG=en_US.UTF-8
 export LC_CTYPE=en_US.UTF-8
+
+# don't load default ranger config
+export RANGER_LOAD_DEFAULT_RC=FALSE

themes/ban.zsh-theme Modified

@@ -8,7 +8,7 @@
 local LC_ALL="" LC_CTYPE="en_US.UTF-8"
 
 # prompt segment shape: arrow or square
-if $is_ssh
+if $IS_SSH
 then
     SEGMENT_SEPARATOR_L=$'\ue0b0'
     SEGMENT_SEPARATOR_R=$''
@@ -46,7 +46,7 @@
 }
 
 prompt_context() {
-    if $is_ssh; then
+    if $IS_SSH; then
 	prompt_segment green black " %(!.%{%F{yellow}%}.)$USER@$HOST "
     fi
 }
@@ -124,7 +124,7 @@
 }
 
 
-if $is_ssh
+if $IS_SSH
 then
     tmux_following_colour=green
 else
@@ -133,7 +133,7 @@
 prompt_tmux() {
     local tmux_indicator
     local SEGMENT_SEPARATOR=''
-    if [[ -n "$TMUX" ]]
+    if $IS_TMUX
     then
 	tmux_indicator=$'\ue0b0'
     else