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

For the builtin history delete: The searchterm can be interpreted as an option #8853

tariq-dev-git opened this issue Apr 3, 2022 · 1 comment
bug Something that's not working as intended


Copy link

If you want to remove an history item (-a or -x or whatever):

  1. history delete --exact --case-sensitive -a # Interpreted as an option for history
  2. history delete --exact --case-sensitive '-a' # The same
  3. history delete --exact --case-sensitive -- -a # The same
  4. history delete --exact --case-sensitive -- '-a' # The same

Instead, you need to write, for it works:
5) history delete --exact --case-sensitive -- -- -a # or '-a'

In /share/functions/ (line:122):

  • builtin history delete $search_mode $_flag_case_sensitive $searchterm
  • builtin history delete $search_mode $_flag_case_sensitive -- $searchterm

The command "history delete", that ask the user for a "Search term: "
Doesn't produce an error (you can enter -a or -x, and the deletion in history is working)

Of course, it's simplier to use the command: "history delete" and enter your searchterm than manually add options.
But the problem occurs when you use the fisher plugin andreiborisov/sponge which auto-delete history entries that returned an error (like -x or -m) at prompt launching.

Fish version: 3.4.0
OS: Debian 11

  • The problem occurs also without third-party customizations
@faho faho closed this as completed in 84bd171 Apr 3, 2022
@faho faho added the bug Something that's not working as intended label Apr 3, 2022
@faho faho added this to the fish 3.5.0 milestone Apr 3, 2022
Copy link

faho commented Apr 3, 2022


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
bug Something that's not working as intended
None yet

No branches or pull requests

2 participants