@cryptotaxi247 / kubo / commits / b17506a18

Make primary option the longer one

License: MIT Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>

Jakub Sztandera committed Jun 3, 2016 at 07:43 UTC b17506a1818808a941612380c83fe2a8c3b6005f
3 files changed +11 -11
core/commands/active.go
+1 -1
@@ -22,7 +22,7 @@ Lists running and recently run commands.
22 res.SetOutput(req.InvocContext().ReqLog.Report())
23 },
24 Options: []cmds.Option{
25 - cmds.BoolOption("v", "verbose", "Print extra information.").Default(false),
25 + cmds.BoolOption("verbose", "v", "Print extra information.").Default(false),
26 },
27 Subcommands: map[string]*cmds.Command{
28 "clear": clearInactiveCmd,
core/commands/files/files.go
+9 -9
@@ -40,7 +40,7 @@ operations.
40 `,
41 },
42 Options: []cmds.Option{
43 - cmds.BoolOption("f", "flush", "Flush target and ancestors after write. Default: true."),
43 + cmds.BoolOption("flush", "f", "Flush target and ancestors after write. Default: true."),
44 },
45 Subcommands: map[string]*cmds.Command{
46 "read": FilesReadCmd,
@@ -397,8 +397,8 @@ Examples:
397 cmds.StringArg("path", true, false, "Path to file to be read."),
398 },
399 Options: []cmds.Option{
400 - cmds.IntOption("o", "offset", "Byte offset to begin reading from."),
401 - cmds.IntOption("n", "count", "Maximum number of bytes to read."),
400 + cmds.IntOption("offset", "o", "Byte offset to begin reading from."),
401 + cmds.IntOption("count", "n", "Maximum number of bytes to read."),
402 },
403 Run: func(req cmds.Request, res cmds.Response) {
404 n, err := req.InvocContext().GetNode()
@@ -565,10 +565,10 @@ stat' on the file or any of its ancestors.
565 cmds.FileArg("data", true, false, "Data to write.").EnableStdin(),
566 },
567 Options: []cmds.Option{
568 - cmds.IntOption("o", "offset", "Byte offset to begin writing at."),
569 - cmds.BoolOption("e", "create", "Create the file if it does not exist."),
570 - cmds.BoolOption("t", "truncate", "Truncate the file to size zero before writing."),
571 - cmds.IntOption("n", "count", "Maximum number of bytes to read."),
568 + cmds.IntOption("offset", "o", "Byte offset to begin writing at."),
569 + cmds.BoolOption("create", "e", "Create the file if it does not exist."),
570 + cmds.BoolOption("truncate", "t", "Truncate the file to size zero before writing."),
571 + cmds.IntOption("count", "n", "Maximum number of bytes to read."),
572 },
573 Run: func(req cmds.Request, res cmds.Response) {
574 path, err := checkPath(req.Arguments()[0])
@@ -678,7 +678,7 @@ Examples:
678 cmds.StringArg("path", true, false, "Path to dir to make."),
679 },
680 Options: []cmds.Option{
681 - cmds.BoolOption("p", "parents", "No error if existing, make parent directories as needed."),
681 + cmds.BoolOption("parents", "p", "No error if existing, make parent directories as needed."),
682 },
683 Run: func(req cmds.Request, res cmds.Response) {
684 n, err := req.InvocContext().GetNode()
@@ -758,7 +758,7 @@ Remove files or directories.
758 cmds.StringArg("path", true, true, "File to remove."),
759 },
760 Options: []cmds.Option{
761 - cmds.BoolOption("r", "recursive", "Recursively remove directories."),
761 + cmds.BoolOption("recursive", "r", "Recursively remove directories."),
762 },
763 Run: func(req cmds.Request, res cmds.Response) {
764 nd, err := req.InvocContext().GetNode()
core/commands/object/patch.go
+1 -1
@@ -251,7 +251,7 @@ to a file containing 'bar', and returns the hash of the new object.
251 cmds.StringArg("ref", true, false, "IPFS object to add link to."),
252 },
253 Options: []cmds.Option{
254 - cmds.BoolOption("p", "create", "Create intermediary nodes.").Default(false),
254 + cmds.BoolOption("create", "p", "Create intermediary nodes.").Default(false),
255 },
256 Run: func(req cmds.Request, res cmds.Response) {
257 nd, err := req.InvocContext().GetNode()