shopt-option

histverify shell option

When Readline is active, places the result of history substitution into the editing buffer rather than immediately executing it. Review the expanded line before pressing Enter. The example checks the flag; editing-buffer behavior is not asserted by this reference fixture. Run in a fresh private directory with HOME set to that directory and LC_ALL=C. Expected output (one item per line): enabled then disabled.

Formal Syntax & Structure

bash syntaxbash
shopt -s histverify; shopt -u histverify

Return Value

exit status

Returns zero on success and nonzero on failure; option queries return zero when enabled.

Working Example

Example Snippetbash
shopt -s histverify || exit 1shopt -q histverify || exit 1shopt -u histverify || exit 1if shopt -q histverify; then exit 1; fiprintf "enabled then disabled\n"
Bash Reference