mirror of
https://github.com/martinvonz/jj.git
synced 2025-01-08 05:39:20 +00:00
cli: colorize tag name in "tag list" output
"working_copy tag" wouldn't be needed, but is added for consistency.
This commit is contained in:
parent
1ce3e9fe44
commit
520b4db919
2 changed files with 9 additions and 0 deletions
|
@ -29,6 +29,7 @@
|
||||||
"branches" = "magenta"
|
"branches" = "magenta"
|
||||||
"local_branches" = "magenta"
|
"local_branches" = "magenta"
|
||||||
"remote_branches" = "magenta"
|
"remote_branches" = "magenta"
|
||||||
|
"tag" = "magenta"
|
||||||
"tags" = "magenta"
|
"tags" = "magenta"
|
||||||
"git_refs" = "green"
|
"git_refs" = "green"
|
||||||
"git_head" = "green"
|
"git_head" = "green"
|
||||||
|
@ -55,6 +56,7 @@
|
||||||
"working_copy branches" = "bright magenta"
|
"working_copy branches" = "bright magenta"
|
||||||
"working_copy local_branches" = "bright magenta"
|
"working_copy local_branches" = "bright magenta"
|
||||||
"working_copy remote_branches" = "bright magenta"
|
"working_copy remote_branches" = "bright magenta"
|
||||||
|
"working_copy tag" = "bright magenta"
|
||||||
"working_copy tags" = "bright magenta"
|
"working_copy tags" = "bright magenta"
|
||||||
"working_copy git_refs" = "bright green"
|
"working_copy git_refs" = "bright green"
|
||||||
"working_copy divergent" = "bright red"
|
"working_copy divergent" = "bright red"
|
||||||
|
|
|
@ -48,6 +48,13 @@ fn test_tag_list() {
|
||||||
test_tag2
|
test_tag2
|
||||||
"###);
|
"###);
|
||||||
|
|
||||||
|
insta::assert_snapshot!(
|
||||||
|
test_env.jj_cmd_success(&repo_path, &["tag", "list", "--color=always"]),
|
||||||
|
@r###"
|
||||||
|
[38;5;5mtest_tag[39m
|
||||||
|
[38;5;5mtest_tag2[39m
|
||||||
|
"###);
|
||||||
|
|
||||||
// Test pattern matching.
|
// Test pattern matching.
|
||||||
insta::assert_snapshot!(
|
insta::assert_snapshot!(
|
||||||
test_env.jj_cmd_success(&repo_path, &["tag", "list", "test_tag2"]),
|
test_env.jj_cmd_success(&repo_path, &["tag", "list", "test_tag2"]),
|
||||||
|
|
Loading…
Reference in a new issue