feat(bonfire): add FlagBool and read every bare switch with it (IN-04, quick-261028-rqd)
This commit is contained in:
@@ -62,11 +62,11 @@ func usageName(name string) string {
|
||||
func (st *rootState) listCommand() Command {
|
||||
c := builtinCommand("list")
|
||||
c.Run = func(_ context.Context, in Input, _ Output) error {
|
||||
all, _ := in.Flag("all")
|
||||
all := FlagBool(in, "all")
|
||||
format, _ := in.Flag("format")
|
||||
switch format {
|
||||
case "", "txt":
|
||||
return st.renderList(st.globals(), all == "true")
|
||||
return st.renderList(st.globals(), all)
|
||||
case "json":
|
||||
return st.renderJSON()
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user