1
0
Fork 0

Set separator from CLI

This commit is contained in:
Daniele Tricoli 2015-12-08 01:54:49 +01:00
parent 6abc82a825
commit 0125b211dc
1 changed files with 6 additions and 1 deletions

View File

@ -97,6 +97,11 @@ func main() {
Name: "show-glyph",
Usage: "show glyph (defaults to true, use --show-glyph=false to disable)",
},
cli.StringFlag{
Name: "separator",
Value: " -- ",
Usage: "separator for unicode fields",
},
},
Action: func(c *cli.Context) {
args := strings.Join(c.Args(), " ")
@ -107,7 +112,7 @@ func main() {
formatter := format.NewTextFormatter(
[]string{"CodePoint", "Name"},
" -- ",
c.String("separator"),
c.Bool("show-glyph"))
if c.Bool("copy") && len(rows) > 1 {