1
0
Fork 0

Add show-glyph flag to enable/disable glyph printing

The default is true, so to show glyph associated to codepoint.
This commit is contained in:
Daniele Tricoli 2015-11-21 20:36:35 +01:00
parent c6c5581e24
commit a8a1a825ec
1 changed files with 5 additions and 1 deletions

View File

@ -93,6 +93,10 @@ func main() {
Name: "copy, c",
Usage: "copy glyph to clipboard",
},
cli.BoolTFlag{
Name: "show-glyph",
Usage: "show glyph (defaults to true, use --show-glyph=false to disable)",
},
},
Action: func(c *cli.Context) {
args := strings.Join(c.Args(), " ")
@ -104,7 +108,7 @@ func main() {
formatter := format.NewTextFormatter(
[]string{"CodePoint", "Name"},
" -- ",
true)
c.Bool("show-glyph"))
if c.Bool("copy") && len(rows) > 1 {
logrus.Warn("Copy to clipboard not allowed for multiple rows.")