aboutsummaryrefslogtreecommitdiff
path: root/functions/utilities.zsh
diff options
context:
space:
mode:
Diffstat (limited to 'functions/utilities.zsh')
-rwxr-xr-xfunctions/utilities.zsh6
1 files changed, 2 insertions, 4 deletions
diff --git a/functions/utilities.zsh b/functions/utilities.zsh
index 61f8cd77..127007fb 100755
--- a/functions/utilities.zsh
+++ b/functions/utilities.zsh
@@ -9,9 +9,7 @@
# Exits with 0 if a variable has been previously defined (even if empty)
# Takes the name of a variable that should be checked.
function defined() {
- local varname="$1"
-
- typeset -p "$varname" > /dev/null 2>&1
+ [[ ! -z "${(tP)1}" ]]
}
# Given the name of a variable and a default value, sets the variable
@@ -86,7 +84,7 @@ case $(uname) in
OS='OSX'
OS_ICON=$(print_icon 'APPLE_ICON')
;;
- CYGWIN_NT-*)
+ CYGWIN_NT-* | MSYS_NT-*)
OS='Windows'
OS_ICON=$(print_icon 'WINDOWS_ICON')
;;