Start all of your commands with a comma (2009)
91–100 of 130 posts
Re: Start all of your commands with a comma (2009)
#92I have used a similar windows trick. I wanted to add to the default window system a place for my library of tools. Most are "portable" cmd apps from various sources (sysinternals, nirsoft). I put them all into a directory called ] in the root of a drive. Because of some common layout of keyboards the \ and ] are near each other, or in reach of left and right pinkies I can type \]\ before the name of the tools. This m…
Re: Start all of your commands with a comma (2009)
#93This brought https://github.com/Shopify/comma to mind
Re: Start all of your commands with a comma (2009)
#94This is a good trick to avoid collisions with system commands. Anytime you add one of your own executables to PATH, prefix it with a comma (,). This way you avoid name collisions and have a handy way of seeing what commands are available on your system using tab completion (, then tab lists all of your personal executables)
Is this comment from a bot? You just reiterated everything from the article.
Re: Start all of your commands with a comma (2009)
#95I do something a bit special... Instead of naming my script foobarnator (and hence risking that another foobarnator may exist in the future and may clash with my script), I name my script foobarnatorToBeAliased.sh . Then in my list of aliases I alias foobarnator to foobarnatorToBeAliased.sh . The alias itself looks a bit weird in that to pass arguments to an aliased command you need to use a function (in Bash at leas…
Porque no los dos? It seems that function ,foo() { printf "Fooo\n"; } ,foo actually works! (at least in my bash 5.0.17 shell)
Re: Start all of your commands with a comma (2009)
#96rsync becomes myrsync mount becomes mymount ssh becoms myssh
No collision and the naming convention empathise that it is indeed used be MYself.
Re: Start all of your commands with a comma (2009)
#97Earlier quoted context omitted.
Two phone sized screenfuls of text is too long now? I'm genuinely interested to know whether you read longform text at all.
I mostly read books. I don't want to pick on the author, but since you asked I will be more specific: this idea would fit in a tweet.* It's a good idea, but the long build up reminds me of recipe sites. * I just use "tweet" as a unit of measure, like "the size of two elephants". I do not advocate the use of twitter.
Re: Start all of your commands with a comma (2009)
#98I have used a similar windows trick. I wanted to add to the default window system a place for my library of tools. Most are "portable" cmd apps from various sources (sysinternals, nirsoft). I put them all into a directory called ] in the root of a drive. Because of some common layout of keyboards the \ and ] are near each other, or in reach of left and right pinkies I can type \]\ before the name of the tools. This m…
Unrelated but I heard it's possible to rename c:\ to /usr/bin or something, depending on your usage. I personally wouldn't mind renaming it to ~/ and be able to use some of my dotfiles in Windows.
Re: Start all of your commands with a comma (2009)
#99 hash -d e=/bin/echo
~e hello world
https://ato.pxeger.com/run?1=m724qjhjwYKlpSVpuhY3lTMSizMUdFM...Re: Start all of your commands with a comma (2009)
#100Clever trick. Too bad there's no good way to namespace commands. It would be interesting if you could have, for instance: $ mkdir -p /tmp/bin/my $ printf '%s\n%s\n' '#!/bin/sh' 'echo hello' > /tmp/bin/my/hello $ chmod 755 /tmp/bin/my/hello $ PATH="/tmp/bin:$PATH" $ my/hello hello
Plan 9 does that, I'm not sure why it never made it into Unix because I always loved it. Your networking-related commands were in `/bin/ip` and you'd run e.g. `ip/ping 1.1.1.1`. If you created the dir `$home/bin/rc/my` and put scripts in it, they would have been runnable as `my/hello` etc like in your example.