New answers tagged command-history
In order to ignore any command not starting with a space, say HISTIGNORE='[^ ]*'
The actual answer to the question you asked is "No, bash does not have a feature like that". It was something I thought about a decade ago when I was working in the same building as the core GNU team, and so I went and talked to them and, apparently, adding this would be a PITA (including figuring out the syntax and storing all that extra history). A lot ...
On UNIX-like systems, the shell sh separates what you type into words and passes each word separately as an argument to the program or builtin-command referred to by the first word (the command name itself is the zeroth argument). Simplified, words are split on every space. Thus, cd .. is two words but cd.. is only one. There is no command named cd.. ...
Top 50 recent answers are included