> Because my shell script names tended to be short and pithy collections of lowercase characters, just like the default system commands, there was no telling when Linux would add a new command that would happen to have the same name as one of mine. Not sure I understand this problem. I just put my bin directory at the front of $PATH rather than the end. To browse my commands, I simply `ls ~/bin`.
But then you start using some tool that expects $0 in the system path and breaks causing frustration and debugging. Pick your poison
Start all of your commands with a comma (2009)
121–130 of 177 posts
Re: Start all of your commands with a comma (2009)
#122Re: Start all of your commands with a comma (2009)
#123Re: Start all of your commands with a comma (2009)
#124I use short custom command names like aa, st, di, dp, cm and le in some thin wrappers around git. One of these names actually collides with a utility that is installed by default on some systems. Doesn’t matter to me. I have my own bin dirs before the system dirs in my path, so mine “win”, and I’m not really interested at all in the tool that mine has a name collision with. If someone were to make a useful to me tool…
The line that separates system and user commands may be defined in different ways, and it may be fuzzy in some places, but if a user accidentally invokes a command that they don't even know why is there, and they didn't explicitly install, then that's clearly a command that shouldn't be directly available in the global namespace.
Re: Start all of your commands with a comma (2009)
#125Earlier quoted context omitted.
Surely ,nds?
I think "comma_nds" ("commands" if you remove the underscore) makes the pun mkre obvious. I didn't get it at first thought, thinking of the .nds file extension for Nintendo DS ROMs.
Re: Start all of your commands with a comma (2009)
#126> Because my shell script names tended to be short and pithy collections of lowercase characters, just like the default system commands, there was no telling when Linux would add a new command that would happen to have the same name as one of mine. Not sure I understand this problem. I just put my bin directory at the front of $PATH rather than the end. To browse my commands, I simply `ls ~/bin`.
Re: Start all of your commands with a comma (2009)
#127A kinda relevant question. I use Windows most of time. Like the author, I have bunch of CLI scripts (in Python mainly) which I put into my ~/bin/ equivalent. After setting python.exe as the default program for `.py` extension, and adding `.py` to `%pathext%`, I can now run my ~/bin/hello.py script at any path by just type `hello`, which I use hundreds of time a day. I now use Linux more and more (still a newbie) but…
You still have to say '.py' at the end, though.
Re: Start all of your commands with a comma (2009)
#128Re: Start all of your commands with a comma (2009)
#129Re: Start all of your commands with a comma (2009)
#130I use short custom command names like aa, st, di, dp, cm and le in some thin wrappers around git. One of these names actually collides with a utility that is installed by default on some systems. Doesn’t matter to me. I have my own bin dirs before the system dirs in my path, so mine “win”, and I’m not really interested at all in the tool that mine has a name collision with. If someone were to make a useful to me tool…
This approach can lead to issues like `apt-get upgrade` launching dwarf fortress: https://askubuntu.com/questions/938606/dwarf-fortress-starti...