Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Condor324966yIt really would've been better if GNU History were to read out the history file and only afterwards write the current command to it... Would've been so much nicer for error handling too. As it is now, it'd always return something, even when there's nothing to see (and it could do a return 1 or something). Oh well, "feature" I guess (:
-
Condor324966y@bahua Fair enough, indeed this is now commonly done by the shell. I'm sure that the shell developers could've implemented it better then. It is also a standalone GNU library though. But that's not really the point, is it?
https://linux.die.net/man/3/history -
bahua129056ySure. But the way I see it is that bash is your old uncle who comes over for dinner. He helps with cooking and dishes, but he has his own way of doing things that isn't the most effective, but he gets it done.
Innovation lives in other shells nowadays. -
Condor324966y@bahua Kind of. Speaking of bash, when I checked in Termux what "history" is there (i.e. which history), bash didn't even return anything, lol. I had to install zsh on it and check there to see whether it's actually a shell built-in (which as it turns out, it indeed is). Oh well. I rarely use the history command anyway. On most setups that I completed my shell customization in, I use zsh and it logs the history to a 100-line ~/.zsh_history file (come to think of it, maybe .history would be better.. guess I'll change that later). So much easier to deal with, and it actually does things the way it should - append the command to the file only after the shell exits. And for commands in the running shell you can use Ctrl-R, so yeah.
Related Rants
Well thanks, that shit is so fucking helpful
random
helpful