Closed pawamoy closed 5 years ago
It seems to be because trap - DEBUG is run inside of a function (_shellhistory_disable).
trap - DEBUG
_shellhistory_disable
A quick fix for this is to use PROMPT_COMMAND to unset it instead:
PROMPT_COMMAND
new_prompt_command=${PROMPT_COMMAND//_shellhistory_after;} PROMPT_COMMAND="trap '${trap:--}' DEBUG; PROMPT_COMMAND='${new_prompt_command}'"
Explanation:
-
It seems to be because
trap - DEBUG
is run inside of a function (_shellhistory_disable
).A quick fix for this is to use
PROMPT_COMMAND
to unset it instead:Explanation:
-
)