commands: Added global -r/--recursive flag
Matt Bell committed
Nov 16, 2014 at 19:13 UTC
ae33905ccd9b51d72c5ae9075ccdf4fa5315cb10
1 file changed
+4
-2
commands/option.go
+4
-2
@@ -136,12 +136,14 @@ func (ov OptionValue) String() (value string, found bool, err error) {
136
const (
137
EncShort = "enc"
138
EncLong = "encoding"
139
+ RecShort = "r"
140
+ RecLong = "recursive"
141
)
142
143
// options that are used by this package
144
var globalOptions = []Option{
143
- Option{[]string{EncShort, EncLong}, String,
144
- "The encoding type the output should be encoded with (json, xml, or text)"},
145
+ StringOption(EncShort, EncLong, "The encoding type the output should be encoded with (json, xml, or text)"),
146
+ BoolOption(RecShort, RecLong, "Add directory paths recursively"),
147
}
148
149
// the above array of Options, wrapped in a Command