Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Oh My Zsh
Commits
4bba11db
Commit
4bba11db
authored
Sep 05, 2014
by
Robby Russell
Browse files
Merge pull request #2744 from docwhat/ostype-not-uname
Use $OSTYPE instead of uname to speed things up
parents
ffe8ce5b
63bae2ab
Changes
7
Hide whitespace changes
Inline
Side-by-side
plugins/battery/battery.plugin.zsh
View file @
4bba11db
...
...
@@ -8,7 +8,7 @@
# Modified to add support for Apple Mac #
###########################################
if
[[
$(
uname
)
==
"D
arwin
"
]]
;
then
if
[[
"
$OSTYPE
"
=
d
arwin
*
]]
;
then
function
battery_pct
()
{
local
smart_battery_status
=
"
$(
ioreg
-rc
"AppleSmartBattery"
)
"
...
...
plugins/bundler/bundler.plugin.zsh
View file @
4bba11db
...
...
@@ -54,7 +54,7 @@ bundle_install() {
if
_bundler-installed
&&
_within-bundled-project
;
then
local
bundler_version
=
`
bundle version |
cut
-d
' '
-f3
`
if
[[
$bundler_version
>
'1.4.0'
||
$bundler_version
=
'1.4.0'
]]
;
then
if
[[
"
$
(
uname
)
"
==
'D
arwin
'
]]
if
[[
"
$
OSTYPE
"
=
d
arwin
*
]]
then
local
cores_num
=
"
$(
sysctl hw.ncpu |
awk
'{print $2}'
)
"
else
...
...
plugins/jira/jira.plugin.zsh
View file @
4bba11db
...
...
@@ -12,7 +12,7 @@
# jira ABC-123 # Opens an existing issue
open_jira_issue
()
{
local
open_cmd
if
[[
$(
uname
-s
)
==
'D
arwin
'
]]
;
then
if
[[
"
$OSTYPE
"
=
d
arwin
*
]]
;
then
open_cmd
=
'open'
else
open_cmd
=
'xdg-open'
...
...
plugins/node/node.plugin.zsh
View file @
4bba11db
...
...
@@ -3,7 +3,7 @@
function
node-docs
{
# get the open command
local
open_cmd
if
[[
$(
uname
-s
)
==
'D
arwin
'
]]
;
then
if
[[
"
$OSTYPE
"
=
d
arwin
*
]]
;
then
open_cmd
=
'open'
else
open_cmd
=
'xdg-open'
...
...
plugins/rake-fast/rake-fast.plugin.zsh
View file @
4bba11db
...
...
@@ -10,7 +10,7 @@ _rake_refresh () {
_rake_does_task_list_need_generating
()
{
if
[
!
-f
.rake_tasks
]
;
then return
0
;
else
if
[[
$(
uname
-s
)
==
'D
arwin
'
]]
;
then
if
[[
"
$OSTYPE
"
=
d
arwin
*
]]
;
then
accurate
=
$(
stat
-f
%m .rake_tasks
)
changed
=
$(
stat
-f
%m Rakefile
)
else
...
...
plugins/sublime/sublime.plugin.zsh
View file @
4bba11db
...
...
@@ -17,7 +17,7 @@ if [[ $('uname') == 'Linux' ]]; then
fi
done
elif
[[
$(
'uname'
)
==
'D
arwin
'
]]
;
then
elif
[[
"
$OSTYPE
"
=
d
arwin
*
]]
;
then
local
_sublime_darwin_paths
>
/dev/null 2>&1
_sublime_darwin_paths
=(
"/usr/local/bin/subl"
...
...
plugins/web-search/web-search.plugin.zsh
View file @
4bba11db
...
...
@@ -3,7 +3,7 @@
function
web_search
()
{
# get the open command
local
open_cmd
if
[[
$(
uname
-s
)
==
'D
arwin
'
]]
;
then
if
[[
"
$OSTYPE
"
=
d
arwin
*
]]
;
then
open_cmd
=
'open'
else
open_cmd
=
'xdg-open'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment