0

I was wondering if it is possible to avoid storing commands in fish history which have failed. At the moment I e.g. have commands like :q stored in my fish history, because I accidentally typed that in the shell instead of vim.

The command makes no sense and the command line, and therefore fails, which makes totally sense. But it would be nice if there would be a possibility to avoid having this failed command in my fish history, because it clutters autocompletion with a lot of senseless commands. Is that somehow possible?

  • Define "failed command" first. – Andrew Henle Feb 13 at 10:37
  • I think with a command not existing at all I already gave a good example. Would already be glad if this would not be added to the history. And in a more naiive approach I would say any exit code not being 0, but I've already been told that this is not a very reliable way of solving this. – Daniel Rotter Feb 13 at 12:41
1

Doesn't seem like it is currently possible, there is an open issue for that: https://github.com/fish-shell/fish-shell/issues/5

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.