|
|
Subscribe / Log in / New account

Program names and "pollution"

Program names and "pollution"

Posted Apr 3, 2019 10:00 UTC (Wed) by epa (subscriber, #39769)
In reply to: Program names and "pollution" by lkundrak
Parent article: Program names and "pollution"

+1 to that but maybe also "git foo" could be an alias for "git/foo", if a directory git/ exists in the PATH. Then a lot of these wrapper commands could be tidied up.


to post comments

Program names and "pollution"

Posted Apr 3, 2019 13:19 UTC (Wed) by mathstuf (subscriber, #69389) [Link] (2 responses)

So `git` needs two `PATH` entries to work? Otherwise `git` would fail because it's a directory…

Program names and "pollution"

Posted Apr 3, 2019 13:54 UTC (Wed) by epa (subscriber, #39769) [Link] (1 responses)

I imagined that just 'git' would produce a message from the shell saying 'git is a directory but the following subcommands exist: git grep, git pull, ...'

That doesn't work if the main 'git' program is more than just a simple wrapper for subcommands -- if there were some hypothetical 'git -xyz' that did something by itself. And the shell's message would be much more basic than the help text printed by the 'git' binary. But there is always the top-level manual page.

Program names and "pollution"

Posted Apr 3, 2019 17:03 UTC (Wed) by martinfick (subscriber, #4455) [Link]

It works if you put them in different directories.


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds