Tangentially related. Don't ever put "." in your PATH. I used to do this to avoid typing the "./" to execute something in my current directory. BAD IDEA. It can turn a typo into a fork bomb. I took down a production server trying to save typing two characters.
Start all of your commands with a comma (2009)
161–170 of 252 posts
Re: Start all of your commands with a comma (2009)
#162Earlier quoted context omitted.
I use my_ as a prefix.
That’s a more meaningful prefix than “,” at the expense of a couple more key strokes. I consider that to still be a win in the book of tab completions. I would replace underscore with “-“ or “.”
Re: Start all of your commands with a comma (2009)
#163Re: Start all of your commands with a comma (2009)
#164Why not just start every alias or script with ë or something?
Re: Start all of your commands with a comma (2009)
#165Re: Start all of your commands with a comma (2009)
#166Re: Start all of your commands with a comma (2009)
#167I 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…
Looked so backwards to me, too. However, I decided to give it a go, anyway. Now, I have some scripts and small commands which start with a comma, and it looks neat and time saving. Yes, I can do path ordering to override usual commands. However, having a set of odd-job scripts which start with a comma gives a nice namespacing capability alongside a well narrowed-down tab-completion experience. While it's not the neat…
Re: Start all of your commands with a comma (2009)
#168instead of using ~/bin I use ~/installed/bin, sometimes I need build a command from source then install it, which might have share/ man/ etc so I can avoid installing them under the home dir.
Re: Start all of your commands with a comma (2009)
#169I think its a fairly good idea - but for myself, i had already mapped csh’s default history character (!) to a comma (,) for the same reason - no shift key to invoke.
Re: Start all of your commands with a comma (2009)
#170Earlier quoted context omitted.
https://github.com/nix-community/comma
I'm not sure I'll ever understand why they replaced their working ~50 line shell script with a Rust program that just shells out to the same nix-* commands. I appreciate that there are some safety benefits, but that program is just not complex enough to benefit.
It does seem to do some more complex stuff now that would've been annoying, but not impossible, to write as a shell script.