is there a way to have the functioning history in current session but not actually save…
- User
is there a way to have the functioning history in current session but not actually save it to HISTFILE?
Assistant
Yes, there are several ways to have functioning history in your current Bash session without saving it to the HISTFILE:
-
Unset HISTFILE for the current session:
unset HISTFILEThis keeps history working in the current session (you can use up arrow, history command, etc.) but nothing will be saved to disk when you exit.
-
Set HISTFILE to /dev/null:
HISTFILE=/dev/nullThis redirects history to the null device, effectively discarding it while maintaining session functionality.
-
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.