Skip to content

Add --json flag to list-modes command #1026

Open
@nikitabobko

Description

It should work in the following way:

$ aerospace list-modes --json
[
  {
    "mode-id" : "main"
  },
  {
    "mode-id" : "service"
  }
]

$ aerospace list-modes --current --json
[
  {
    "mode-id" : "service"
  }
]

The reasoning for "redundant" wrapping objects is to make the API future-proof and consistent with other list-* commands.


E.g. in the future:

$ aerospace list-modes --json --format '%{mode-id} %{visible-mode-name}'
[
  {
    "mode-id" : "service",
    "visible-mode-name" : "Service Mode"
  }
]

Metadata

Assignees

No one assigned

    Labels

    good-first-issueEasy to fix issues. Good for newcomers

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions