> The lower-case letters are the very characters used in system commands; brackets, backslashes, the colon, the back-tick, and the single-tick all had a special meaning to the shell Please note that brackets have no special meaning to the shell.
Start all of your commands with a comma (2009)
131–140 of 177 posts
Re: Start all of your commands with a comma (2009)
#132I dislike this immensely. It costs nothing to type "~/bin" in front of the command each and every time. And it means I can put comma's wherever I want in some commands that use them, like SQL .. I do, however, like to comment my custom commands: $ mv ~/Desktop/*pdf ~/Documents/PDF # pdfsync $ for i in ~/Documents/Development/JUCE/JUCE_Projects/* ; do ; cowsay $i ; cd $i ; git pull ; git fetch --all ; git submodule up…
Re: Start all of your commands with a comma (2009)
#133Re: Start all of your commands with a comma (2009)
#134> 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`.
I just… remember the names I give things? Why is this considered a “hack” of some kind?
I forget names all the time. I even forget I wrote entire projects sometimes. That's why I try to organise my systems in a way I can easily stumble upon things I haven't thought about in months, or years.
I find this article's approach actually solves a problem for me. I do find myself going back to the ~/bin folder once I a while to look for some script I use less often. So at least for N=2, it's a cool hack.
Re: Start all of your commands with a comma (2009)
#135Starting with comma is also a common technique in the text expander / text replacement community.
Re: Start all of your commands with a comma (2009)
#136Re: Start all of your commands with a comma (2009)
#137> 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
Re: Start all of your commands with a comma (2009)
#138No thank you. Put your personal bin first in PATH, and use /usr/bin or /bin for referring to the shadowed programs. You can list your personalized tooling using ~/bin/[Tab] for whatever value there is in that.
If you don't like the system's grep (e.g. Solaris grep or whatever) but prefer your own (e.g. GNU grep), why wouldn't you just want that to be "grep".
Re: Start all of your commands with a comma (2009)
#139Re: Start all of your commands with a comma (2009)
#140An alternative method for avoiding collisions in PATH is to use really long executable names that are unlikely to be used by other executables and then have shorter aliases for them in your bashrc. The aliases won't affect executables called from within scripts and you can still refer to your executables by their long names in your own scripts. One drawback is that this doesn't have the same tab completion ergonomics…
> One drawback is that this doesn't have the same tab completion ergonomics, which I have to admit is really nifty. They do in zsh