- 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:
Paul Beckingham 2012-02-20 01:23:34 -05:00
parent 9f8165e3c6
commit d386081c4c

View file

@ -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)));
}
////////////////////////////////////////////////////////////////////////////////