Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Z
zsh
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Jobs
Commits
Open sidebar
Debian
zsh
Commits
ed4c8f3d
Commit
ed4c8f3d
authored
Feb 03, 2019
by
dana
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
44030: prompt: Return error for unrecognised colour name
parent
4f6ac08a
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
0 deletions
+15
-0
ChangeLog
ChangeLog
+5
-0
Src/prompt.c
Src/prompt.c
+2
-0
Test/D01prompt.ztst
Test/D01prompt.ztst
+8
-0
No files found.
ChangeLog
View file @
ed4c8f3d
2019-02-03 dana <dana@dana.is>
* 44030: Src/prompt.c, Test/D01prompt.ztst: Return error for
unrecognised colour name
2019-01-28 Fredric Silberberg <fred@silberberg.xyz>
* github #32: Completion/Unix/Command/_git: Fix a typo in the
...
...
Src/prompt.c
View file @
ed4c8f3d
...
...
@@ -1663,6 +1663,8 @@ match_colour(const char **teststrp, int is_fg, int colour)
/* default */
return
is_fg
?
TXTNOFGCOLOUR
:
TXTNOBGCOLOUR
;
}
if
(
colour
<
0
)
return
TXT_ERROR
;
}
else
{
colour
=
(
int
)
zstrtol
(
*
teststrp
,
(
char
**
)
teststrp
,
10
);
...
...
Test/D01prompt.ztst
View file @
ed4c8f3d
...
...
@@ -221,3 +221,11 @@
print ${(%U)Y-%(v}
0:Regression test for test on empty psvar
>
# Unrecognised colour strings should produce the default sequence
f=${(%):-'%f'} # Recognised
Fdefault=${(%):-'%F{default}'} # Recognised
Freset=${(%):-'%F{reset}'} # Unrecognised
Ffoo=${(%):-'%F{foo}'} # Unrecognised
[[ $f == $Fdefault && $Fdefault == $Freset && $Freset == $Ffoo ]]
0:Regression test for workers/44029
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