提交 a0ed0675 编写于 作者: C Chai Feng 提交者: Toan Nguyen

Fixed `typeset +m` is a zsh specific feature (#49)

上级 c35410e8
...@@ -79,7 +79,7 @@ function try_alias_value() { ...@@ -79,7 +79,7 @@ function try_alias_value() {
# 0 if the variable exists, 3 if it was set # 0 if the variable exists, 3 if it was set
# #
function default() { function default() {
test `typeset +m "$1"` && return 0 typeset -p "$1" &>/dev/null && return 0
typeset -g "$1"="$2" && return 3 typeset -g "$1"="$2" && return 3
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册