mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-08-19 02:56:37 +02:00
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)
This commit is contained in:
committed by
Christian Höltje
parent
207b6a1e33
commit
63bae2aba9
@@ -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'
|
||||
|
Reference in New Issue
Block a user