random note on something that was hard to figure out:
bash tab complete using:
complete -C [commandtorun] [commandtocomplete]
it will run the "commandtorun" command with three arguments.
- commandtocomplete
- the incomplete arg token at the prompt or "" for an empty token
- the arg token just before the incomplete token… which may be commandtocomplete if there are no intermediate args.
Had to write an exe to write out the incoming args to a text file to figure this out. the docs are a bit thin on the matter.