I prefer all my custom commands as 1 letter. On my most frequently used machine/dev env this means - e for vim m for mise n for pnpm c for Claude x for codex
Start all of your commands with a comma (2009)
81–90 of 252 posts
Re: Start all of your commands with a comma (2009)
#82I 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…
Just on your first suggestion, this also means that if a person or process can drop a file (unknown to you) into your ~/bin/ then they can wreak havoc. Eg they can override `sudo` to capture your password, or override `rm` to send your files somewhere interesting, and so on. Btw on the second suggestion, I think there's a command named `command` that can help with that sort of thing, avoids recursive pitfalls.
Re: Start all of your commands with a comma (2009)
#83can someone explain security consideration of placing scripts into $HOME? Some time ago I moved all my scripts to /usr/local/bin, because I feel that this is better from security perspective.
Re: Start all of your commands with a comma (2009)
#84I 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…
curious if you're customizing anyway, why not use eg ripgrep?
Re: Start all of your commands with a comma (2009)
#85Nice although I think the ASCII comma feels wrong as part of a filename even if for purely aesthetic reasons. If we want to stay within (lowercase) alphabetic Latin characters I think prefixing with the least common letters or bigrams that start a word (x, q, y, z, j) is best. `y' for instance only autocompletes to `yes' and `ypdomainname' on my path. Choosing a unique bigram is actually quite easy and a fun exercise…
Re: Start all of your commands with a comma (2009)
#86Using commas in filenames feels kind of weird to me, but I do use a comma as the initiator for my Bash key sequences. For example: ,, expands to $ ,h expands to --help ,v expands to --version ,s prefixes sudo You put keyseqs in ~/.inputc, set a keyseq-timeout, and it just works.
Re: Start all of your commands with a comma (2009)
#87I appreciate the idea, but the comma just looks horrible to me as part of a filename. I can imagine someone unfamiliar with the naming scheme to get confused. I'd prefer to use underscore (when writing BASH scripts, I name all my local variables starting with underscore), but a simple two or three letter prefix would also work. I don't like the idea of a punctuation prefix as punctuation usually has a specific meanin…
> I don't like the idea of a punctuation prefix as punctuation usually has a specific meaning somewhere and including it as the first character in a filename looks wrong.
So you don’t use dotfiles? ;)
Re: Start all of your commands with a comma (2009)
#88Re: Start all of your commands with a comma (2009)
#89Why so many people use ~/bin/? What’s wrong with ~/.local/bin?
~/bin predates it.
And of course you can use both.