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

Delete and edit custom commands history items #3534

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

stefanhaller
Copy link
Collaborator

@stefanhaller stefanhaller commented Apr 27, 2024

  • PR Description

Allow deleting and editing custom command history items. Deleting is done by hitting d on a suggestion; editing is done by pressing Tab, which fills the selected item into the command prompt for further editing.

Closes #2528.

  • Please check if the PR fulfills these requirements
  • Cheatsheets are up-to-date (run go generate ./...)
  • Code has been formatted (see here)
  • Tests have been added/updated (see here for the integration test guide)
  • Text is internationalised (see here)
  • Docs (specifically docs/Config.md) have been updated if necessary
  • You've read through your own file changes for silly mistakes etc

In the custom commands panel you can now tab to the suggestions and hit 'd' to
delete items from there. Useful if you mistyped a command and don't want it to
appear in your history any more.
… suggestions

For custom commands it is useful to select an earlier command, tab back into the
prompt field, and edit it there. This makes it somewhat similar to working with
your shell history.

For other types of suggestion panels we don't enable this behavior, as you can't
create arbitrary new items there that don't already exist as a suggestion.
@stefanhaller
Copy link
Collaborator Author

Marking this as a draft for now because I didn't add tests yet. Before I spend time on that I first wanted to confirm that we want this. (I find it pretty useful myself.)

@stefanhaller stefanhaller added the enhancement New feature or request label Apr 27, 2024
Copy link

codacy-production bot commented Apr 27, 2024

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
-0.04% (target: -2.00%) 38.18%
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (aa81e19) 50656 42634 84.16%
Head commit (e4a68b8) 50712 (+56) 42662 (+28) 84.13% (-0.04%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#3534) 55 21 38.18%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

Codacy will stop sending the deprecated coverage status from June 5th, 2024. Learn more

@mark2185
Copy link
Collaborator

Just for future reference, this will close #2528 .

…ck from suggestions

Fix crash when tabbing back to prompt after deleting all history items.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add command to remove command history
2 participants