Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
meishi125478
ohmyzsh
提交
0a2a981d
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,发现更多精彩内容 >>
提交
0a2a981d
编写于
5月 26, 2010
作者:
H
Hayes Williams
提交者:
Robby Russell
5月 27, 2010
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Adds a new theme that only seems to work on Linux
上级
5a3bde78
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
80 addition
and
0 deletion
+80
-0
themes/linuxonly
themes/linuxonly
+80
-0
未找到文件。
themes/linuxonly
0 → 100644
浏览文件 @
0a2a981d
# vim: set ts=2 textwidth=0
autoload
-U
add-zsh-hook
autoload
-Uz
vcs_info
local
c0
=
$(
printf
"
\0
33[0m"
)
local
c1
=
$(
printf
"
\0
33[38;5;215m"
)
local
c2
=
$(
printf
"
\0
33[38;5;209m"
)
local
c3
=
$(
printf
"
\0
33[38;5;203m"
)
local
c4
=
$(
printf
"
\0
33[33;4m"
)
local
c5
=
$(
printf
"
\0
33[38;5;137m"
)
local
c6
=
$(
printf
"
\0
33[38;5;240m"
)
local
c7
=
$(
printf
"
\0
33[38;5;149m"
)
local
c8
=
$(
printf
"
\0
33[38;5;126m"
)
local
c9
=
$(
printf
"
\0
33[38;5;162m"
)
local
foopath
=
$(
perl /home/scp1/bin/foopath
)
if
[
"
$TERM
"
=
"linux"
]
;
then
c1
=
$(
printf
"
\0
33[34;1m"
)
c2
=
$(
printf
"
\0
33[35m"
)
c3
=
$(
printf
"
\0
33[31m"
)
c4
=
$(
printf
"
\0
33[31;1m"
)
c5
=
$(
printf
"
\0
33[32m"
)
c6
=
$(
printf
"
\0
33[32;1m"
)
c7
=
$(
printf
"
\0
33[33m"
)
c8
=
$(
printf
"
\0
33[33;1m"
)
c9
=
$(
printf
"
\0
33[34m"
)
fi
#local newtv=$(perl $HOME/devel/newtv.pl)
local
newtv
=
''
zstyle
':vcs_info:*'
actionformats
\
'%{$c8%}(%f%s)%{$c7%}-%F{5}[%F{2}%b%F{3}|%F{1}%a%F{5}]%f '
zstyle
':vcs_info:*'
formats
\
"%{
$c8
%}%s%{
$c7
%}:%{
$c7
%}(%{
$c9
%}%b%{
$c7
%})%f "
zstyle
':vcs_info:(sv[nk]|bzr):*'
branchformat
'%b%F{1}:%F{3}%r'
zstyle
':vcs_info:*'
enable
git
add-zsh-hook precmd prompt_jnrowe_precmd
prompt_jnrowe_precmd
()
{
vcs_info
if
[
"
${
vcs_info_msg_0_
}
"
=
""
]
;
then
#dir_status="|%F{3}%n%F{7}@%F{3}%m%F{7}:%F{9}%l%f"
#dir_status="$c1%n%F{7}@%F{9}%m%F{7}:%F{12}%/"
dir_status
=
"%{
$c1
%}%n%{
$c4
%}@%{
$c2
%}%m%{
$c0
%}:%{
$c3
%}%l%{
$c6
%}->%{
$c4
%}%/ %{
$c0
%}(%{
$c5
%}%?%{
$c0
%})"
#dir_status="%{$c1%}%n%{$c4%}@%{$c2%}%m%{$c0%}:%{$c3%}%l%{$c6%}->%{$foopath%} %{$c0%}(%{$c5%}%?%{$c0%})"
PROMPT
=
'%{$fg_bold[green]%}%p%{$reset_color%}${vcs_info_msg_0_}${dir_status} ${ret_status}%{$reset_color%}
> '
elif
[[
$(
git diff
--cached
--name-status
2>/dev/null
)
!=
""
]]
;
then
dir_status
=
"%{
$c1
%}%n%{
$c4
%}@%{
$c2
%}%m%{
$c0
%}:%{
$c3
%}%l%{
$c6
%}->%{
$c4
%}%/ %{
$c0
%}(%{
$c5
%}%?%{
$c0
%})"
PROMPT
=
'${vcs_info_msg_0_}
%{$fg_bold[green]%}%p%{$reset_color%}${dir_status} ${vcs_info_msg_0_}%{$reset_color%}
> '
elif
[[
$(
git diff
--name-status
2>/dev/null
)
!=
""
]]
;
then
dir_status
=
"%{
$c1
%}%n%{
$c4
%}@%{
$c2
%}%m%{
$c0
%}:%{
$c3
%}%l%{
$c6
%}->%{
$c4
%}%/ %{
$c0
%}(%{
$c5
%}%?%{
$c0
%})"
PROMPT
=
'${vcs_info_msg_0_}
%{$fg_bold[green]%}%p%{$reset_color%}${dir_status}%{$reset_color%}
%{$c9%}·>%{$c0%} '
else
dir_status
=
"%{
$c1
%}%n%{
$c4
%}@%{
$c2
%}%m%{
$c0
%}:%{
$c3
%}%l%{
$c6
%}->%{
$c4
%}%/ %{
$c0
%}(%{
$c5
%}%?%{
$c0
%})"
PROMPT
=
'${vcs_info_msg_0_}
%{$fg_bold[green]%}%p%{$reset_color%}${dir_status} ${vcs_info_msg_0_}%{$reset_color%}
> '
fi
}
#PROMPT='${ret_status}%{$fg_bold[green]%}%p %{$reset_color%} ${vcs_info_msg_0_}${dir_status}%{$reset_color%}
#> '
# vim: set ft=zsh ts=4 sw=4 et:
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录