mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Bug
- Modified format 'uuid.short' to show the leftmost 8 characters from a UUID, which is the same as partial UUID matching implemented in #891.
This commit is contained in:
parent
9f8165e3c6
commit
d386081c4c
1 changed files with 3 additions and 3 deletions
|
@ -48,7 +48,7 @@ ColumnUUID::ColumnUUID ()
|
|||
_styles.push_back ("short");
|
||||
|
||||
_examples.push_back ("f30cb9c3-3fc0-483f-bfb2-3bf134f00694");
|
||||
_examples.push_back ("34f00694");
|
||||
_examples.push_back ("f30cb9c3");
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -80,13 +80,13 @@ void ColumnUUID::render (
|
|||
Color& color)
|
||||
{
|
||||
// f30cb9c3-3fc0-483f-bfb2-3bf134f00694 default
|
||||
// 34f00694 short
|
||||
// f30cb9c3 short
|
||||
if (_style == "default" ||
|
||||
_style == "long")
|
||||
lines.push_back (color.colorize (leftJustify (task.get (_name), width)));
|
||||
|
||||
else if (_style == "short")
|
||||
lines.push_back (color.colorize (leftJustify (task.get (_name).substr (28), width)));
|
||||
lines.push_back (color.colorize (leftJustify (task.get (_name).substr (0, 8), width)));
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue