Просмотр исходного кода

refactor: move bash checkwinsize down into it's behavior section to simplify things

Kyle P Davis 2 лет назад
Родитель
Сommit
1b81e24399
1 измененных файлов с 4 добавлено и 5 удалено
  1. 4 5
      .profile

+ 4 - 5
.profile

@@ -77,11 +77,6 @@ else
 	setopt HIST_IGNORE_SPACE # ignore if leading space
 	setopt HIST_IGNORE_SPACE # ignore if leading space
 fi
 fi
 
 
-# check window size after each command
-if [ ! "$ZSH_VERSION" ]; then
-	shopt -s checkwinsize
-fi
-
 # Custom shell aliases
 # Custom shell aliases
 if [ "$OS" = "Darwin" ]; then
 if [ "$OS" = "Darwin" ]; then
 	export CLICOLOR=1
 	export CLICOLOR=1
@@ -168,6 +163,9 @@ if [ "$ZSH_VERSION" ]; then
 	# ensure proper ls-style colors in completion
 	# ensure proper ls-style colors in completion
 	zstyle ':completion:*' list-colors 'di=34:ln=35:so=32:pi=33:ex=31:bd=46;34:cd=43;34:su=41;30:sg=46;30:tw=42;30:ow=43;30'
 	zstyle ':completion:*' list-colors 'di=34:ln=35:so=32:pi=33:ex=31:bd=46;34:cd=43;34:su=41;30:sg=46;30:tw=42;30:ow=43;30'
 else
 else
+	# check window size after each command
+	shopt -s checkwinsize
+
 	# tab completion FTW
 	# tab completion FTW
 	if [ "$OS" = "Darwin" ]; then
 	if [ "$OS" = "Darwin" ]; then
 		F="$BREW_PREFIX/etc/bash_completion";  ! [ -f "$F" ]  ||  source "$F"
 		F="$BREW_PREFIX/etc/bash_completion";  ! [ -f "$F" ]  ||  source "$F"
@@ -175,6 +173,7 @@ else
 	else
 	else
 		F="/etc/bash_completion";  ! [ -f "$F" ]  ||  source "$F"
 		F="/etc/bash_completion";  ! [ -f "$F" ]  ||  source "$F"
 	fi
 	fi
+
 	F="$HOME/.liquidprompt/liquidprompt";  ! [ -f "$F" ]  ||  source "$F"
 	F="$HOME/.liquidprompt/liquidprompt";  ! [ -f "$F" ]  ||  source "$F"
 fi
 fi