diff options
author | Christian Höltje <choltje@us.ibm.com> | 2014-04-23 10:13:26 -0400 |
---|---|---|
committer | Christian Höltje <docwhat@gerf.org> | 2014-07-23 09:18:14 -0400 |
commit | 63bae2aba9c43a70bbb374fc46e287d7bc46cc54 (patch) | |
tree | 6788a4a11930acca085bafb3d1b0610a8de14dd8 /plugins/web-search/web-search.plugin.zsh | |
parent | 207b6a1e338e03ba06cccf255fbaa7e6147e8f94 (diff) | |
download | zsh-63bae2aba9c43a70bbb374fc46e287d7bc46cc54.tar.gz zsh-63bae2aba9c43a70bbb374fc46e287d7bc46cc54.tar.bz2 zsh-63bae2aba9c43a70bbb374fc46e287d7bc46cc54.zip |
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)
Diffstat (limited to 'plugins/web-search/web-search.plugin.zsh')
-rw-r--r-- | plugins/web-search/web-search.plugin.zsh | 2 |
1 files changed, 1 insertions, 1 deletions
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' |