Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
meishi125478
ohmyzsh
提交
a56eac7a
O
ohmyzsh
项目概览
meishi125478
/
ohmyzsh
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
ohmyzsh
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
a56eac7a
编写于
10月 10, 2016
作者:
H
Hong
提交者:
Marc Cornellà
10月 10, 2016
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Use OSTYPE instead of uname whenever possible for better speed. (#5496)
上级
98cd3973
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
9 addition
and
9 deletion
+9
-9
lib/theme-and-appearance.zsh
lib/theme-and-appearance.zsh
+2
-2
plugins/battery/battery.plugin.zsh
plugins/battery/battery.plugin.zsh
+1
-1
plugins/gitfast/git-completion.bash
plugins/gitfast/git-completion.bash
+1
-1
plugins/sublime/sublime.plugin.zsh
plugins/sublime/sublime.plugin.zsh
+1
-1
plugins/zsh-navigation-tools/_n-kill
plugins/zsh-navigation-tools/_n-kill
+2
-2
plugins/zsh-navigation-tools/n-kill
plugins/zsh-navigation-tools/n-kill
+2
-2
未找到文件。
lib/theme-and-appearance.zsh
浏览文件 @
a56eac7a
...
...
@@ -6,11 +6,11 @@ export LSCOLORS="Gxfxcxdxbxegedabagacad"
if
[[
"
$DISABLE_LS_COLORS
"
!=
"true"
]]
;
then
# Find the option for using colors in ls, depending on the version
if
[[
"
$
(
uname
-s
)
"
==
"NetBSD"
]]
;
then
if
[[
"
$
OSTYPE
"
==
netbsd
*
]]
;
then
# On NetBSD, test if "gls" (GNU ls) is installed (this one supports colors);
# otherwise, leave ls as is, because NetBSD's ls doesn't support -G
gls
--color
-d
.
&>/dev/null
&&
alias ls
=
'gls --color=tty'
elif
[[
"
$
(
uname
-s
)
"
==
"OpenBSD"
]]
;
then
elif
[[
"
$
OSTYPE
"
==
openbsd
*
]]
;
then
# On OpenBSD, "gls" (ls from GNU coreutils) and "colorls" (ls from base,
# with color and multibyte support) are available from ports. "colorls"
# will be installed on purpose and can't be pulled in by installing
...
...
plugins/battery/battery.plugin.zsh
浏览文件 @
a56eac7a
...
...
@@ -64,7 +64,7 @@ if [[ "$OSTYPE" = darwin* ]] ; then
[[
$(
ioreg
-rc
"AppleSmartBattery"
|
grep
'^.*"IsCharging"\ =\ '
|
sed
-e
's/^.*"IsCharging"\ =\ //'
)
==
"Yes"
]]
}
elif
[[
$(
uname
)
==
"Linux"
]]
;
then
elif
[[
"
$OSTYPE
"
=
linux
*
]]
;
then
function
battery_is_charging
()
{
!
[[
$(
acpi 2>/dev/null |
grep
-c
'^Battery.*Discharging'
)
-gt
0
]]
...
...
plugins/gitfast/git-completion.bash
浏览文件 @
a56eac7a
...
...
@@ -2771,6 +2771,6 @@ __git_complete gitk __gitk_main
# when the user has tab-completed the executable name and consequently
# included the '.exe' suffix.
#
if
[
Cygwin
=
"
$(
uname
-o
2>/dev/null
)
"
]
;
then
if
[
[
"
$OSTYPE
"
=
cygwin
*
]
]
;
then
__git_complete git.exe __git_main
fi
plugins/sublime/sublime.plugin.zsh
浏览文件 @
a56eac7a
if
[[
$(
'uname'
)
==
'Linux'
]]
;
then
if
[[
"
$OSTYPE
"
==
linux
*
]]
;
then
local
_sublime_linux_paths
>
/dev/null 2>&1
_sublime_linux_paths
=(
"
$HOME
/bin/sublime_text"
...
...
plugins/zsh-navigation-tools/_n-kill
浏览文件 @
a56eac7a
...
...
@@ -10,8 +10,8 @@ integer cygwin=0
local IFS="
"
case "$
(uname)
" in
CYGWIN
*) list=( `command ps -Wa` ); cygwin=1 ;;
case "$
OSTYPE
" in
cygwin
*) list=( `command ps -Wa` ); cygwin=1 ;;
*) list=( `command ps -o pid,uid,command -A` ) ;;
esac
...
...
plugins/zsh-navigation-tools/n-kill
浏览文件 @
a56eac7a
...
...
@@ -42,8 +42,8 @@ NLIST_NONSELECTABLE_ELEMENTS=( 1 )
type
ps 2>/dev/null 1>&2
||
{
echo
>
&2
"Error:
\`
ps' not found"
;
return
1
}
case
"
$
(
uname
)
"
in
CYGWIN
*
)
list
=(
`
command
ps
-Wa
`
)
;;
case
"
$
OSTYPE
"
in
cygwin
*
)
list
=(
`
command
ps
-Wa
`
)
;;
*
)
list
=(
`
command
ps
-o
pid,uid,command
-A
`
)
;;
esac
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录