When we enter an empty command, the last one (from builtin history 1) is appended to the extended history file. I have only one idea to fix this: record the BASH_COMMAND variable and check if it's empty (or composed of spaces). An issue with that is that the comments will be removed I think, so typing #just a comment would not be appended to history (is it really a problem?) ...
When we enter an empty command, the last one (from
builtin history 1
) is appended to the extended history file. I have only one idea to fix this: record the BASH_COMMAND variable and check if it's empty (or composed of spaces). An issue with that is that the comments will be removed I think, so typing#just a comment
would not be appended to history (is it really a problem?) ...