summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTuowen Zhao <ztuowen@gmail.com>2019-09-26 11:35:31 -0600
committerTuowen Zhao <ztuowen@gmail.com>2019-09-26 11:35:31 -0600
commit09829ba30c269e35bddf44a21f3357efd31e686f (patch)
tree8ad263cf7e6508ce9f947e6b9fc5c60a7d9fff76 /lib
parentd676c1553254309beca5bb9a8edb43fbe09a7169 (diff)
parentf9e7c45a484723f693a77ab6128a1cc163f3704a (diff)
downloadzsh-09829ba30c269e35bddf44a21f3357efd31e686f.tar.gz
zsh-09829ba30c269e35bddf44a21f3357efd31e686f.tar.bz2
zsh-09829ba30c269e35bddf44a21f3357efd31e686f.zip
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'lib')
-rw-r--r--lib/functions.zsh9
1 files changed, 2 insertions, 7 deletions
diff --git a/lib/functions.zsh b/lib/functions.zsh
index 9f8736bd7..61dfa4780 100644
--- a/lib/functions.zsh
+++ b/lib/functions.zsh
@@ -21,7 +21,7 @@ function open_command() {
case "$OSTYPE" in
darwin*) open_cmd='open' ;;
cygwin*) open_cmd='cygstart' ;;
- linux*) ! [[ $(uname -a) =~ "Microsoft" ]] && open_cmd='xdg-open' || {
+ linux*) [[ "$(uname -r)" != *icrosoft* ]] && open_cmd='nohup xdg-open' || {
open_cmd='cmd.exe /c start ""'
[[ -e "$1" ]] && { 1="$(wslpath -w "${1:a}")" || return 1 }
} ;;
@@ -31,12 +31,7 @@ function open_command() {
;;
esac
- # don't use nohup on OSX
- if [[ "$OSTYPE" == darwin* ]]; then
- ${=open_cmd} "$@" &>/dev/null
- else
- nohup ${=open_cmd} "$@" &>/dev/null
- fi
+ ${=open_cmd} "$@" &>/dev/null
}
#