summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/pkg/flag/flag.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/pkg/flag/flag.go b/src/pkg/flag/flag.go
index ff72c08e2..0471d126c 100644
--- a/src/pkg/flag/flag.go
+++ b/src/pkg/flag/flag.go
@@ -31,8 +31,13 @@
Command line flag syntax:
-flag
-flag=x
- -flag x
+ -flag x // non-boolean flags only
One or two minus signs may be used; they are equivalent.
+ The last form is not permitted for boolean flags because the
+ meaning of the command
+ cmd -x *
+ will change if there is a file called 0, false, etc. You must
+ use the -flag=false form to turn off a boolean flag.
Flag parsing stops just before the first non-flag argument
("-" is a non-flag argument) or after the terminator "--".