Skip to content

Commit

Permalink
Merge pull request #1859 from rht/flag-order
Browse files Browse the repository at this point in the history
Fix cli flag orders (long, short)
  • Loading branch information
jbenet committed Oct 20, 2015
2 parents dbeebe8 + 916ae8d commit 289e74c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions commands/option.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,8 @@ const (
)

// options that are used by this package
var OptionEncodingType = StringOption(EncShort, EncLong, "The encoding type the output should be encoded with (json, xml, or text)")
var OptionRecursivePath = BoolOption(RecShort, RecLong, "Add directory paths recursively")
var OptionEncodingType = StringOption(EncLong, EncShort, "The encoding type the output should be encoded with (json, xml, or text)")
var OptionRecursivePath = BoolOption(RecLong, RecShort, "Add directory paths recursively")
var OptionStreamChannels = BoolOption(ChanOpt, "Stream channel output")
var OptionTimeout = StringOption(TimeoutOpt, "set a global timeout on the command")

Expand Down
2 changes: 1 addition & 1 deletion core/commands/id.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ ipfs id supports the format option for output with the following keys:
cmds.StringArg("peerid", false, false, "peer.ID of node to look up").EnableStdin(),
},
Options: []cmds.Option{
cmds.StringOption("f", "format", "optional output format"),
cmds.StringOption("format", "f", "optional output format"),
},
Run: func(req cmds.Request, res cmds.Response) {
node, err := req.InvocContext().GetNode()
Expand Down
2 changes: 1 addition & 1 deletion core/commands/ls.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ it contains, with the following format:
cmds.StringArg("ipfs-path", true, true, "The path to the IPFS object(s) to list links from").EnableStdin(),
},
Options: []cmds.Option{
cmds.BoolOption("headers", "", "Print table headers (Hash, Name, Size)"),
cmds.BoolOption("headers", "v", "Print table headers (Hash, Name, Size)"),
},
Run: func(req cmds.Request, res cmds.Response) {
node, err := req.InvocContext().GetNode()
Expand Down

0 comments on commit 289e74c

Please sign in to comment.