summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/functions.zsh9
-rw-r--r--plugins/sublime/sublime.plugin.zsh2
2 files changed, 3 insertions, 8 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
}
#
diff --git a/plugins/sublime/sublime.plugin.zsh b/plugins/sublime/sublime.plugin.zsh
index 3a82d6c7f..69604ab4f 100644
--- a/plugins/sublime/sublime.plugin.zsh
+++ b/plugins/sublime/sublime.plugin.zsh
@@ -15,7 +15,7 @@ alias stn=create_project
declare -a _sublime_paths
if [[ "$OSTYPE" == linux* ]]; then
- if [[ "$(uname -r)" = *Microsoft* ]]; then
+ if [[ "$(uname -r)" = *icrosoft* ]]; then
_sublime_paths=(
"$(wslpath -u 'C:\Program Files\Sublime Text 3\subl.exe')"
"$(wslpath -u 'C:\Program Files\Sublime Text 2\subl.exe')"