Live data from Hacker News

Start all of your commands with a comma (2009)

rhodesmill.org

41–50 of 130 posts

Re: Start all of your commands with a comma (2009)

#41
post #8

Clever 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

Ahem, technically there is one way (don't know if it is "good", though):

    $ export $MY = /tmp/my
    $ $MY/hello
    hello

Re: Start all of your commands with a comma (2009)

#42
post #29

Earlier quoted context omitted.

My keyboard came with a tab key, so I don't worry about my commands having short names.

Until you have five commands which all use the prefix `sort-incoming-` and then three commands named `sort-incoming-hourly` and `sort-incoming-monthly` etc.

It would be nice to have camel-case completion in the shell, i.e. have “SIH” be completed to “SortIncomingHourly” and “SIM” to “SortIncomingMonthly”, etc. (only for upper-case characters). That way one could get more mileage out of the possible character combinations.

Re: Start all of your commands with a comma (2009)

#43
post #8

Clever 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

You could (ab)use home directories for that. I.e. place your hello into /home/my, and then you can invoke it as ~my/hello. You even get namespace completion for free after the `~`.

Re: Start all of your commands with a comma (2009)

#44
post #27
post #5

Quoted post unavailable.

Reposts are ok after a year or so. This is in the FAQ: https://news.ycombinator.com/newsfaq.html . Could you please review the site guidelines at https://news.ycombinator.com/newsguidelines.html and stick to them? Your last sentence there breaks more than one of the rules.

Again, to reiterate, the original comment was not a statement that this should not have been reposted. I am not sure how I could make that clearer? I have read the site guidelines. Many of them are subjective and inconsistent with unknown applicability. If you, as the administrator, are unable to accept that evaluation, then please just delete this account and all associated posts.

Re: Start all of your commands with a comma (2009)

#48
post #15

Earlier quoted context omitted.

It can if you are executing programs that then try to execute those commands and get your commands instead.

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...

https://direnv.net/

Re: Start all of your commands with a comma (2009)

#49
post #13

Earlier quoted context omitted.

Is this comment from a bot? You just reiterated everything from the article.

This is an explanation that the parent comment simply reiterated the point of the article rather than adding content.

This is a link to a story titled "This is the title of this story, which is also found several times in the story itself": https://stuff.mit.edu/people/dpolicar/writing/prose/text/tit...

Re: Start all of your commands with a comma (2009)

#50

I 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…

I put c:\tools in my path, then put shortcuts to all my tools in there (ie: shortcut to AgentRansack named ar). Now, I pull up the run command (WND+R) type ar and agent ransack opens.
Post reply on HN