Start all of your commands with a comma (2009)
21–30 of 252 posts
Re: Start all of your commands with a comma (2009)
#22(2009)
2024: https://news.ycombinator.com/item?id=40769362
Re: Start all of your commands with a comma (2009)
#23 Every tool and shell that lay in arm's reach treated the comma as a perfectly normal and unobjectionable character in a filename.
WTF. After 40 years maybe I should have figured that one out.Re: Start all of your commands with a comma (2009)
#24This is one of those ideas that is so simple and elegant that it makes you think “why did I never think of doing this?!” Neat trick! I don’t think I’ll namespace everything this way, because there’s some aliases and commands I run so often that the comma would get annoying, but for other less frequently used helper scripts then this will be perfect!
This convention was suggested by the GNU Arch version control system years ago (maybe 20??), but it's really useful for the same tab completion reason and I have kept it for almost two decades, even when I switched to git.
Re: Start all of your commands with a comma (2009)
#25I didn't like the idea. I prefer the alternative approach: _I_ decide the order of dirs in the PATH env. If I introduce an executable with a name, that overrides a system one - I probably do that intentionally. If I introduce an alias (like `grep='grep --binary-files=without-match --ignore-case --color=auto`) that matches the name of a system binary - I probably do that intentionally. And if I EVER need to call grep…
... and breaks existing scripts that reference the system one, right?
Re: Start all of your commands with a comma (2009)
#26Every tool and shell that lay in arm's reach treated the comma as a perfectly normal and unobjectionable character in a filename. WTF. After 40 years maybe I should have figured that one out.
Re: Start all of your commands with a comma (2009)
#27Re: Start all of your commands with a comma (2009)
#28I didn't like the idea. I prefer the alternative approach: _I_ decide the order of dirs in the PATH env. If I introduce an executable with a name, that overrides a system one - I probably do that intentionally. If I introduce an alias (like `grep='grep --binary-files=without-match --ignore-case --color=auto`) that matches the name of a system binary - I probably do that intentionally. And if I EVER need to call grep…
Re: Start all of your commands with a comma (2009)
#29`.local/bin` seems to be much more common in my experience for this use case. And for good reason.
Re: Start all of your commands with a comma (2009)
#30Why so many people use ~/bin/? What’s wrong with ~/.local/bin?