pawamoy / shell-history

Visualize your shell usage with Highcharts!
ISC License
112 stars 2 forks source link

Don't append last command when hitting enter on empty line #4

Closed pawamoy closed 7 years ago

pawamoy commented 7 years ago

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?) ...