Looking at the confusion between batou and appenv I suggest we implement a new scheme where appenv becomes its own script and the actual (managed) utilities are symlinks (so that appenv determines which script to run by looking at the argv[0]) by which it was called. This removes the need for a "meta" argument parser:
ctheune@fourteen-3 /tmp/asdf $ ls -lah
total 0
drwxr-xr-x 4 ctheune wheel 128B Feb 23 06:54 .
drwxrwxrwt 494 root wheel 15K Feb 23 06:54 ..
-rw-r--r-- 1 ctheune wheel 0B Feb 23 06:54 appenv
lrwxr-xr-x 1 ctheune wheel 6B Feb 23 06:54 batou -> appenv
This also means we can easily add more symlinks, think harder about updating appenv itself and maybe providing it as a real, versioned package instead of just a curl'ed file.
If we want to make it flexible what the name of appenv is, we can determine whether we're talking to appenv vs. using appenv by simply checking whether arvg0 is a symlink instead of a real file.
Looking at the confusion between batou and appenv I suggest we implement a new scheme where appenv becomes its own script and the actual (managed) utilities are symlinks (so that appenv determines which script to run by looking at the argv[0]) by which it was called. This removes the need for a "meta" argument parser:
This also means we can easily add more symlinks, think harder about updating appenv itself and maybe providing it as a real, versioned package instead of just a curl'ed file.