aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Paris <[email protected]>2016-10-18 14:46:27 -0400
committerGitHub <[email protected]>2016-10-18 14:46:27 -0400
commit0e7ce96826adebbd2556517e0a993030ef3a0c51 (patch)
tree67c0ed1945717dcfb2545f7c9ae3592274d88e10
parentbf8481a6aebc13a8aab52e699ffe2e79771f5a3f (diff)
parentf2a61de59b416a221708c3943926ef417d17efed (diff)
Merge pull request #100 from dnephin/dont-escape-windows-paths
Don't print escaped strings for the default value of string flags.
-rw-r--r--flag.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/flag.go b/flag.go
index 4258f45..d9aee57 100644
--- a/flag.go
+++ b/flag.go
@@ -514,7 +514,7 @@ func (f *FlagSet) FlagUsages() string {
if len(flag.NoOptDefVal) > 0 {
switch flag.Value.Type() {
case "string":
- line += fmt.Sprintf("[=%q]", flag.NoOptDefVal)
+ line += fmt.Sprintf("[=\"%s\"]", flag.NoOptDefVal)
case "bool":
if flag.NoOptDefVal != "true" {
line += fmt.Sprintf("[=%s]", flag.NoOptDefVal)