fish

How to stop Fish shell store critical information


I really like fish auto completion but I don't want to store any parameters in it, I know I can use --private or -P, but it only remove the history only when the terminal closed.

fish -P

How to make sure fish doesn't save any temporary parameters? Or maybe you have any good alternative that work fine like fish but doesn't store anything?


Solution

  • I know I can use --private or -P, but it only remove the history only when the terminal closed.

    What "--private" does is prevent the history from being stored on disk. It doesn't "remove" the history after exit as much as it's never stored anywhere but your RAM.

    There is nothing to keep fish from keeping even interactive history on a global basis.

    If you want fish to not remember any particular commandline, start it with a space:

    > echo sad # is remembered
    >  echo happy # is not