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?

2
  • Define "failed command" first. Commented Feb 13, 2019 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. Commented Feb 13, 2019 at 12:41

1 Answer 1

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .