add short and long descriptions of the commands
This commit is contained in:
parent
617c2fccf9
commit
491870e247
@ -28,6 +28,8 @@ type Command struct {
|
|||||||
Func func(CmdArgs) (int, error)
|
Func func(CmdArgs) (int, error)
|
||||||
Flags *flag.FlagSet
|
Flags *flag.FlagSet
|
||||||
Use string
|
Use string
|
||||||
|
Short string
|
||||||
|
Long string
|
||||||
}
|
}
|
||||||
|
|
||||||
var commandRegistry = make(map[string]Command)
|
var commandRegistry = make(map[string]Command)
|
||||||
|
@ -18,6 +18,7 @@ func init() {
|
|||||||
Func: LsCmd,
|
Func: LsCmd,
|
||||||
Flags: fs,
|
Flags: fs,
|
||||||
Use: "[--selector=<selector>",
|
Use: "[--selector=<selector>",
|
||||||
|
Short: "List the lights",
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -43,6 +43,7 @@ func init() {
|
|||||||
Func: SetColorCmd,
|
Func: SetColorCmd,
|
||||||
Flags: fs,
|
Flags: fs,
|
||||||
Use: "[--selector <selector>] [--power (on|off)] [--hue <hue>] [--saturation <saturation>] [--rgb <rbg>] [--name <color>] [--brightness <brightness>] [--duration <sec>] [--fast]",
|
Use: "[--selector <selector>] [--power (on|off)] [--hue <hue>] [--saturation <saturation>] [--rgb <rbg>] [--name <color>] [--brightness <brightness>] [--duration <sec>] [--fast]",
|
||||||
|
Short: "Set the color",
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -36,6 +36,7 @@ func init() {
|
|||||||
Func: SetStateCmd,
|
Func: SetStateCmd,
|
||||||
Flags: fs,
|
Flags: fs,
|
||||||
Use: "[--selector <selector>] [--power (on|off)] [--color <color>] [--brightness <brightness>] [--duration <sec>] [--infrared <infrared>] [--fast]",
|
Use: "[--selector <selector>] [--power (on|off)] [--color <color>] [--brightness <brightness>] [--duration <sec>] [--infrared <infrared>] [--fast]",
|
||||||
|
Short: "Set various state attributes",
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -39,6 +39,7 @@ func init() {
|
|||||||
Func: SetWhiteCmd,
|
Func: SetWhiteCmd,
|
||||||
Flags: fs,
|
Flags: fs,
|
||||||
Use: "[--selector <selector>] [--power (on|off)] [--kelvin <kelvin>] [--name <color>] [--brightness <brightness>] [--duration <sec>] [--infrared] [--fast]",
|
Use: "[--selector <selector>] [--power (on|off)] [--kelvin <kelvin>] [--name <color>] [--brightness <brightness>] [--duration <sec>] [--infrared] [--fast]",
|
||||||
|
Short: "Set the white level",
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -19,6 +19,7 @@ func init() {
|
|||||||
Func: ToggleCmd,
|
Func: ToggleCmd,
|
||||||
Flags: fs,
|
Flags: fs,
|
||||||
Use: "[--selector <selector>] [--duration <sec>]",
|
Use: "[--selector <selector>] [--duration <sec>]",
|
||||||
|
Short: "Toggle the power on/off",
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user