Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
oh-my-zsh
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
github
oh-my-zsh
Commits
d7418f2b
Commit
d7418f2b
authored
Nov 16, 2013
by
Robby Russell
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2253 from eddiemonge/patch-1
no tabs in a space-d file
parents
06021cca
3930a632
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
32 deletions
+32
-32
agnoster.zsh-theme
themes/agnoster.zsh-theme
+32
-32
No files found.
themes/agnoster.zsh-theme
View file @
d7418f2b
...
@@ -95,38 +95,38 @@ prompt_git() {
...
@@ -95,38 +95,38 @@ prompt_git() {
}
}
prompt_hg
()
{
prompt_hg
()
{
local
rev status
local
rev status
if
$(
hg
id
>
/dev/null 2>&1
)
;
then
if
$(
hg
id
>
/dev/null 2>&1
)
;
then
if
$(
hg prompt
>
/dev/null 2>&1
)
;
then
if
$(
hg prompt
>
/dev/null 2>&1
)
;
then
if
[[
$(
hg prompt
"{status|unknown}"
)
=
"?"
]]
;
then
if
[[
$(
hg prompt
"{status|unknown}"
)
=
"?"
]]
;
then
# if files are not added
# if files are not added
prompt_segment red white
prompt_segment red white
st
=
'±'
st
=
'±'
elif
[[
-n
$(
hg prompt
"{status|modified}"
)
]]
;
then
elif
[[
-n
$(
hg prompt
"{status|modified}"
)
]]
;
then
# if any modification
# if any modification
prompt_segment yellow black
prompt_segment yellow black
st
=
'±'
st
=
'±'
else
else
# if working copy is clean
# if working copy is clean
prompt_segment green black
prompt_segment green black
fi
fi
echo
-n
$(
hg prompt
"☿ {rev}@{branch}"
)
$st
echo
-n
$(
hg prompt
"☿ {rev}@{branch}"
)
$st
else
else
st
=
""
st
=
""
rev
=
$(
hg
id
-n
2>/dev/null |
sed
's/[^-0-9]//g'
)
rev
=
$(
hg
id
-n
2>/dev/null |
sed
's/[^-0-9]//g'
)
branch
=
$(
hg
id
-b
2>/dev/null
)
branch
=
$(
hg
id
-b
2>/dev/null
)
if
`
hg st |
grep
-Eq
"^
\?
"
`
;
then
if
`
hg st |
grep
-Eq
"^
\?
"
`
;
then
prompt_segment red black
prompt_segment red black
st
=
'±'
st
=
'±'
elif
`
hg st |
grep
-Eq
"^(M|A)"
`
;
then
elif
`
hg st |
grep
-Eq
"^(M|A)"
`
;
then
prompt_segment yellow black
prompt_segment yellow black
st
=
'±'
st
=
'±'
else
else
prompt_segment green black
prompt_segment green black
fi
fi
echo
-n
"☿
$rev
@
$branch
"
$st
echo
-n
"☿
$rev
@
$branch
"
$st
fi
fi
fi
fi
}
}
# Dir: current working directory
# Dir: current working directory
...
...
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