Add commands for managing queries in namedqueries mode #1533
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I wanted to use namedqueries as my main startup mode. I hadn't used namedqueries before and wanted some easy management tools for them. So this adds the following commands:
query-rename NEWNAME
query-duplicate NEWNAME
(newname defaults to oldname_copy, so this can be bound to other commands)query-remove
is a shortcut forremovequery
global command, which deletes the currently highlighted query (after a prompt)query-refine
opens a prompt where you can edit thesavequery
command for the currently highlighted command. This is useful because it allows you to edit both the query name, and the query itself. This is effectively both an "edit" command, as well as a "edit and save as" command.This branch is only preliminary - I wanted to check if there were any general objections to the approaches, naming, etc. If not, then I'd like to add documentation and tests.
By the way, great project! I'm enjoying using it and hope to be contributing more.