Update docs on detecting fish_private_mode

fish_private_mode is active if set to something non-empty, but the docs
suggested checking if it is set at all. Switch the docs to match the
implementation through `test -n "$fish_private_mode"`

Fixes #8001
This commit is contained in:
ridiculousfish 2021-05-17 18:41:35 -07:00
parent 6d00ad1045
commit c0b33774ca

View file

@ -144,7 +144,7 @@ If ``$fish_private_mode`` is set to a non-empty value, commands will not be writ
You can also launch with ``fish --private`` (or ``fish -P`` for short). This both hides old history and prevents writing history to disk. This is useful to avoid leaking personal information (e.g. for screencasts) or when dealing with sensitive information.
You can query the variable ``fish_private_mode`` (``if set -q fish_private_mode ...``) if you would like to respect the user's wish for privacy and alter the behavior of your own fish scripts.
You can query the variable ``fish_private_mode`` (``if test -n "$fish_private_mode" ...``) if you would like to respect the user's wish for privacy and alter the behavior of your own fish scripts.
.. _editor: