From fb13aa332738c8c414bc4cb602a9bc2378da2a27 Mon Sep 17 00:00:00 2001 From: Sorin Ionescu Date: Sun, 2 Feb 2014 20:37:56 -0500 Subject: [PATCH] [WIP] DO NOT USE --- modules/archive/functions/unarchive | 2 +- modules/completion/init.zsh | 6 ++++-- modules/go/init.zsh | 0 modules/helper/init.zsh | 2 +- modules/homebrew/init.zsh | 1 - modules/spectrum/init.zsh | 2 +- 6 files changed, 7 insertions(+), 6 deletions(-) create mode 100644 modules/go/init.zsh diff --git a/modules/archive/functions/unarchive b/modules/archive/functions/unarchive index 36fe85b6..18a26a00 100644 --- a/modules/archive/functions/unarchive +++ b/modules/archive/functions/unarchive @@ -73,7 +73,7 @@ while (( $# > 0 )); do esac (( success = $success > 0 ? $success : $? )) - (( $success == 0 )) && (( $remove_archive == 0 )) && rm "$1" + (( $success == 0 && $remove_archive == 0 )) && rm "$1" shift done diff --git a/modules/completion/init.zsh b/modules/completion/init.zsh index 3ffad633..6f5f4432 100644 --- a/modules/completion/init.zsh +++ b/modules/completion/init.zsh @@ -123,8 +123,10 @@ zstyle ':completion:*:*:kill:*' force-list always zstyle ':completion:*:*:kill:*' insert-ids single # Man -zstyle ':completion:*:manuals' separate-sections true -zstyle ':completion:*:manuals.(^1*)' insert-sections true +# zstyle ':completion:*:manuals' separate-sections true +# zstyle ':completion:*:manuals.(^1*)' insert-sections true +zstyle ':completion:*:manuals.*' insert-sections true +zstyle ':completion:*:man:*' menu yes select # Media Players zstyle ':completion:*:*:mpg123:*' file-patterns '*.(mp3|MP3):mp3\ files *(-/):directories' diff --git a/modules/go/init.zsh b/modules/go/init.zsh new file mode 100644 index 00000000..e69de29b diff --git a/modules/helper/init.zsh b/modules/helper/init.zsh index 7e0f9d57..cb4e7c8e 100644 --- a/modules/helper/init.zsh +++ b/modules/helper/init.zsh @@ -12,7 +12,7 @@ function is-autoloadable { # Checks if a name is a command, function, or alias. function is-callable { - (( $+commands[$1] )) || (( $+functions[$1] )) || (( $+aliases[$1] )) + (( $+commands[$1] || $+functions[$1] || $+aliases[$1] )) } # Checks a boolean variable for "true". diff --git a/modules/homebrew/init.zsh b/modules/homebrew/init.zsh index 6f0299af..3643d10c 100644 --- a/modules/homebrew/init.zsh +++ b/modules/homebrew/init.zsh @@ -22,4 +22,3 @@ alias brews='brew search' alias brewu='brew upgrade' alias brewU='brew update && brew upgrade' alias brewx='brew remove' - diff --git a/modules/spectrum/init.zsh b/modules/spectrum/init.zsh index 86b5ecc6..73802762 100644 --- a/modules/spectrum/init.zsh +++ b/modules/spectrum/init.zsh @@ -57,7 +57,7 @@ FG[none]="$FX[none]" BG[none]="$FX[none]" colors=(black red green yellow blue magenta cyan white) for color in {0..255}; do - if (( $color >= 0 )) && (( $color < $#colors )); then + if (( $color >= 0 && $color < $#colors )); then index=$(( $color + 1 )) FG[$colors[$index]]="\e[38;5;${color}m" BG[$colors[$index]]="\e[48;5;${color}m"