From c0b33774ca07527f290d9af49c0784841034b24f Mon Sep 17 00:00:00 2001 From: ridiculousfish Date: Mon, 17 May 2021 18:41:35 -0700 Subject: [PATCH] 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 --- doc_src/interactive.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc_src/interactive.rst b/doc_src/interactive.rst index 4d62b6bf2..9adffdf80 100644 --- a/doc_src/interactive.rst +++ b/doc_src/interactive.rst @@ -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: