shopt-option
Bash shopt lithist
When cmdhist is also enabled, favors embedded newlines over semicolons when saving multiline commands. Toggle test only; actual interactive history representation is not tested here. Run in a fresh private directory with HOME set to that directory and LC_ALL=C. Expected output (one item per line): enabled with cmdhist; disabled-status=1.
Formal Syntax & Structure
bash syntaxbash
shopt -s lithist; shopt -u lithist; shopt -q lithistReturn Value
exit status
Option-setting command returns zero for a valid request; query status is zero if enabled, one if disabled.
Working Example
Example Snippetbash
shopt -s cmdhist lithistshopt -q lithist || exit 1printf 'enabled with cmdhist\n'shopt -u lithistshopt -q lithistprintf 'disabled-status=%s\n' "$?"