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
9a2376bd
Commit
9a2376bd
authored
Feb 20, 2016
by
Yad Smood
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add: exit code
parent
aeca2ad8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
ys.zsh-theme
themes/ys.zsh-theme
+6
-4
No files found.
themes/ys.zsh-theme
View file @
9a2376bd
...
@@ -35,15 +35,16 @@ ys_hg_prompt_info() {
...
@@ -35,15 +35,16 @@ ys_hg_prompt_info() {
fi
fi
}
}
local exit_code="%(?,%?,%{$fg[red]%}%?%{$reset_color%})"
# Prompt format:
# Prompt format:
#
#
# PRIVILEGES USER @ MACHINE in DIRECTORY on git:BRANCH STATE [TIME]
L:SHELL_LEVEL N:LINE_NUM
# PRIVILEGES USER @ MACHINE in DIRECTORY on git:BRANCH STATE [TIME]
tty:$TTY L:$SHELL_LEVEL N:LINE_NUM C:LAST_EXIT_CODE
# $ COMMAND
# $ COMMAND
#
#
# For example:
# For example:
#
#
# % ys @ ys-mbp in ~/.oh-my-zsh on git:master x [21:47:42] tty:s000 L:1 N:12
# % ys @ ys-mbp in ~/.oh-my-zsh on git:master x [21:47:42] tty:s000 L:1 N:12
C:0
# $
# $
PROMPT="
PROMPT="
%{$terminfo[bold]$fg[blue]%}#%{$reset_color%} \
%{$terminfo[bold]$fg[blue]%}#%{$reset_color%} \
...
@@ -53,6 +54,7 @@ PROMPT="
...
@@ -53,6 +54,7 @@ PROMPT="
%{$fg[white]%}in \
%{$fg[white]%}in \
%{$terminfo[bold]$fg[yellow]%}%~%{$reset_color%}\
%{$terminfo[bold]$fg[yellow]%}%~%{$reset_color%}\
${hg_info}\
${hg_info}\
${git_info} \
${git_info}\
%{$fg[white]%}[%*] tty:%l L:%L N:%i
\
%{$fg[white]%}[%*] tty:%l L:%L N:%i C:$exit_code
%{$terminfo[bold]$fg[red]%}$ %{$reset_color%}"
%{$terminfo[bold]$fg[red]%}$ %{$reset_color%}"
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