From 63bae2aba9c43a70bbb374fc46e287d7bc46cc54 Mon Sep 17 00:00:00 2001 From: Christian HoĢˆltje Date: Wed, 23 Apr 2014 10:13:26 -0400 Subject: Use $OSTYPE instead of uname to speed things up The $OSTYPE variable is set at ZSH compile time and can be safely used to determine the OS of the system. e.g. darwin (os x) --- plugins/web-search/web-search.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins/web-search/web-search.plugin.zsh') diff --git a/plugins/web-search/web-search.plugin.zsh b/plugins/web-search/web-search.plugin.zsh index 8eedb90ee..f056e38e8 100644 --- a/plugins/web-search/web-search.plugin.zsh +++ b/plugins/web-search/web-search.plugin.zsh @@ -4,7 +4,7 @@ function web_search() { # get the open command local open_cmd - if [[ $(uname -s) == 'Darwin' ]]; then + if [[ "$OSTYPE" = darwin* ]]; then open_cmd='open' else open_cmd='xdg-open' -- cgit v1.2.3-70-g09d2