4 ms·
Disk space is the least of the problems garbage entries in command history cause. It's not just commands that are actual for the current session (like ls/cd/ca
by mathfailure 3y ago
Disk space is the least of the problems garbage entries in command history cause.
It's not just commands that are actual for the current session (like ls/cd/cat), it's also incorrect commands or just commands not worth retaining still being saved among with the useful commands.
The most precious is user's time. And when you fzf part of the command with the regularly saved history and would like to re-execute something important - you'll first get a long list that you'll first have to filter to find the command you were seeking.
So to counter your question with another: why store garbage?
- jefftk 3y agoA typical command I run is never going to be something I look up again, so I would prefer to optimize for writing instead of reading. Dumping every command to a file adds no friction to my regular work, while attempting to categorize garbage commands would add a lot of friction. Also, when I do want to reference my deep history I often find that seeing the full list of what I was doing is helpful at getting myself back into the frame of mind I was in when I ran the commands originally, which can be more valuable than seeing exactly which commands I ran.
- mathfailure 3y ago> A typical command I run is never going to be something I look up again, so I would prefer to optimize for writing instead of reading. Dumping every command to a file adds no friction to my regular work Then why write history at all? Just discard it.
- jefftk 3y agoBecause even with the friction of my history not having been pruned or otherwise tidied it's still a really valuable resource when I do need it!