summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/compfix.zsh2
-rw-r--r--lib/functions.zsh6
-rw-r--r--lib/misc.zsh1
-rw-r--r--lib/termsupport.zsh2
4 files changed, 5 insertions, 6 deletions
diff --git a/lib/compfix.zsh b/lib/compfix.zsh
index 68decc1ed..b09b283f2 100644
--- a/lib/compfix.zsh
+++ b/lib/compfix.zsh
@@ -18,7 +18,7 @@ function handle_completion_insecurities() {
insecure_dirs=( ${(f@):-"$(compaudit 2>/dev/null)"} )
# If no such directories exist, get us out of here.
- (( ! ${#insecure_dirs} )) && return
+ [[ -z "${insecure_dirs}" ]] && return
# List ownership and permissions of all insecure directories.
print "[oh-my-zsh] Insecure completion-dependent directories detected:"
diff --git a/lib/functions.zsh b/lib/functions.zsh
index 4ef8920f6..9f8736bd7 100644
--- a/lib/functions.zsh
+++ b/lib/functions.zsh
@@ -79,7 +79,7 @@ function try_alias_value() {
# 0 if the variable exists, 3 if it was set
#
function default() {
- test `typeset +m "$1"` && return 0
+ (( $+parameters[$1] )) && return 0
typeset -g "$1"="$2" && return 3
}
@@ -93,8 +93,8 @@ function default() {
# 0 if the env variable exists, 3 if it was set
#
function env_default() {
- env | grep -q "^$1=" && return 0
- export "$1=$2" && return 3
+ (( ${${(@f):-$(typeset +xg)}[(I)$1]} )) && return 0
+ export "$1=$2" && return 3
}
diff --git a/lib/misc.zsh b/lib/misc.zsh
index f45c10757..b30822b50 100644
--- a/lib/misc.zsh
+++ b/lib/misc.zsh
@@ -23,7 +23,6 @@ env_default 'LESS' '-R'
## super user alias
alias _='sudo'
-alias please='sudo'
## more intelligent acking for ubuntu users
if which ack-grep &> /dev/null; then
diff --git a/lib/termsupport.zsh b/lib/termsupport.zsh
index 87d55ee89..aa14f3f07 100644
--- a/lib/termsupport.zsh
+++ b/lib/termsupport.zsh
@@ -21,7 +21,7 @@ function title {
print -Pn "\e]2;$2:q\a" # set window name
print -Pn "\e]1;$1:q\a" # set tab name
;;
- screen*)
+ screen*|tmux*)
print -Pn "\ek$1:q\e\\" # set screen hardstatus
;;
*)