Skip to content

Implement #1687 - Add %{all} format variables to lists queries#1708

Open
BenjaminBini wants to merge 2 commits intonikitabobko:mainfrom
BenjaminBini:issue-1687
Open

Implement #1687 - Add %{all} format variables to lists queries#1708
BenjaminBini wants to merge 2 commits intonikitabobko:mainfrom
BenjaminBini:issue-1687

Conversation

@BenjaminBini
Copy link

Add %{all} format variable support to commands listing Aerospace objects :

  • list-windows
  • list-workspaces
  • list-apps
  • list-monitors

Includes relevant tests and doc.

More details in commit description.

Copilot AI review requested due to automatic review settings September 19, 2025 12:08
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR implements the %{all} format variable for Aerospace list commands, allowing users to include all available variables in output when using the --json flag. This addresses issue #1687.

  • Adds %{all} format variable support to all list commands (windows, workspaces, apps, monitors)
  • Implements validation to ensure %{all} is only used with --json flag and cannot be mixed with other variables
  • Updates documentation and adds comprehensive test coverage

Reviewed Changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
docs/aerospace-list-*.adoc Documents the new %{all} format variable for all list commands
Sources/Common/cmdArgs/impl/ListWindowsCmdArgs.swift Adds %{all} enum case, validation logic, and format handling
Sources/Common/cmdArgs/impl/ListWorkspacesCmdArgs.swift Updates format handling and adds validation for %{all} usage
Sources/Common/cmdArgs/impl/ListMonitorsCmdArgs.swift Updates format handling and adds validation for %{all} usage
Sources/Common/cmdArgs/impl/ListAppsCmdArgs.swift Updates format handling and adds validation for %{all} usage
Sources/AppBundleTests/command/*.swift Adds test coverage for %{all} format variable validation

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@nikitabobko nikitabobko force-pushed the main branch 2 times, most recently from f324d2e to 7aff813 Compare November 24, 2025 01:31
…ries

Add %{all} format variable support to commands listing Aerospace objects :
* `list-windows`
* `list-workspaces`
* `list-apps`
* `list-monitors`

Convenient way to output all available format variables in list queries rather than listing all of them.
Following variables are ignored from the output: `rightPadding`, `newLine`, `tab`.
It only works when using JSON format (--json argument).
Variable can not be used with other variables in the template string, it must be alone (whitespaces ignored).
@BenjaminBini
Copy link
Author

Rebased on main

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants