Documenting the HISTCONTROL ignorespace option (#4825)

This commit is contained in:
jbw3 2022-05-28 10:52:27 -05:00 committed by GitHub
parent 259fbe540c
commit 42f081c8c7
Failed to generate hash of commit
2 changed files with 30 additions and 6 deletions

23
news/ignorespace-doc.rst Normal file
View file

@ -0,0 +1,23 @@
**Added:**
* Documented the HISTCONTROL ignorespace option
**Changed:**
* <news item>
**Deprecated:**
* <news item>
**Removed:**
* <news item>
**Fixed:**
* <news item>
**Security:**
* <news item>

View file

@ -1540,12 +1540,13 @@ class PromptHistorySetting(Xettings):
set(),
"A set of strings (comma-separated list in string form) of options "
"that determine what commands are saved to the history list. By "
"default all commands are saved. The option ``ignoredups`` will not "
"save the command if it matches the previous command. The option "
"``ignoreerr`` will cause any commands that fail (i.e. return non-zero "
"exit status) to not be added to the history list. The option "
"``erasedups`` will remove all previous commands that matches and updates the frequency. "
"Note: ``erasedups`` is supported only in sqlite backend).",
"default all commands are saved. Options are as follows:\n\n"
"- ``ignoredups`` will not save the command if it matches the previous command\n"
"- ``ignoreerr`` will cause any commands that fail (i.e. return non-zero "
"exit status) to not be added to the history list\n"
"- ``ignorespace`` will not save the command if it begins with a space\n"
"- ``erasedups`` will remove all previous commands that matches and updates the frequency "
"(Note: only supported in sqlite backend)",
can_store_as_str=True,
)
XONSH_HISTORY_SIZE = Var(