Earlier quoted context omitted.
Do you know any of the history of why your link to `.../Shopify/...` redirects to `.../nix-community/...`? Is the latter an open-source contribution by Shopify?
I think it was originally developed and maintained by Shopify, but was then handed off to the nix community
Start all of your commands with a comma (2009)
71–80 of 130 posts
Re: Start all of your commands with a comma (2009)
#72clever idea, but does it need such a long post to describe?
Two phone sized screenfuls of text is too long now? I'm genuinely interested to know whether you read longform text at all.
* 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)
#73Clever 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.
Re: Start all of your commands with a comma (2009)
#74Earlier quoted context omitted.
I wish it was easier to create "snapshots" of a particular set of environment variables in order to use them later as run environments. I also wish that Unix desktop environments generally made it easier to manage env vars, but that's another complaint. And don't get me started on PAM env vars...
Just env vars? env > "$(date +s).env-snapshot" (And use it again slightly more awkwardly as or something more convenient to `cmd`.)
Re: Start all of your commands with a comma (2009)
#75I tend to give programs longer, more descriptive names and then do the short names as shell aliases. That way there’s little risk of name collision for the original program, scripts using the canonical name remain readable, and the shorthand is free to evolve to fit varying work habits.
Re: Start all of your commands with a comma (2009)
#76I 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…
I used to do this, but it doesn't work with things like "watch".
alias watch='watch '
Specifically, if an alias ends with a space, it will cause the subsequent arg to be expanded as well. For example, try running: alias beep=echo
watch beep hello # This will fail
alias watch='watch '
watch beep hello # Now it works!
[1]: https://news.ycombinator.com/item?id=31830879Re: Start all of your commands with a comma (2009)
#77Clever 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
my hello
I.e. only my needs to be in the global namespace and all other commands are resolved by my itself.Re: Start all of your commands with a comma (2009)
#78Re: Start all of your commands with a comma (2009)
#79Re: Start all of your commands with a comma (2009)
#80I 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…
> 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 least AFACIT) but it all works fine. No you don't: $ alias say=echo $ say beep beep You do need to do something special the other way around (if you wrap a command in a function it needs to explicitly pass the arguments on).