Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improvements to command querying #437

Merged
merged 4 commits into from
Dec 31, 2024
Merged

Improvements to command querying #437

merged 4 commits into from
Dec 31, 2024

Conversation

LucasPickering
Copy link
Owner

@LucasPickering LucasPickering commented Dec 31, 2024

Description

Describe the change. If there is an associated issue, please include the issue link (e.g. "Closes #xxx"). For UI changes, please also include screenshots.

  • Kill pending query process when a new one is started
  • Add a keybind (?, same as help dialog) to view the error when a command fails
    • We report a notification when this happens that includes the keybind
  • Add commands.shell config field, to define how all commands should be executed
    • Defaults to sh -c, so you can now use pipes in the query out of the box
  • Add commands.default_query to define an initial query string for all responses. For example, default_query: jq will pre-populate the box with jq so you can start writing actual queries faster

Known Risks

What issues could potentially go wrong with this change? Is it a breaking change? What have you done to mitigate any potential risks?

  • Help dialog
  • Default/persistence interaction
  • I haven't tested this on Windows at all

QA

How did you test this?

Added a good amount of unit tests

Checklist

  • Have you read CONTRIBUTING.md already?
  • Did you update CHANGELOG.md?
    • Only user-facing changes belong in the changelog. Internal changes such as refactors should only be included if they'll impact users, e.g. via performance improvement.
  • Did you remove all TODOs?
    • If there are unresolved issues, please open a follow-on issue and link to it in a comment so future work can be tracked

This reuses the Open Help binding which is maybe annoying, but I doubt the two will interfere much. I think ? for help in general is intuitive.
@LucasPickering LucasPickering changed the base branch from master to 3.0 December 31, 2024 21:37
@LucasPickering LucasPickering force-pushed the command-improvements branch 3 times, most recently from e9f5bdf to 57f0919 Compare December 31, 2024 23:01
By default query commands are now run within a shell. The user can customize the shell they want, or disable the shell entirely, via the config.
@LucasPickering LucasPickering merged commit bbe961b into 3.0 Dec 31, 2024
15 checks passed
@LucasPickering LucasPickering deleted the command-improvements branch December 31, 2024 23:41
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.

1 participant