|
|
|
|
|
by shagie
674 days ago
|
|
How would a shell interrogate the valid parameters from a complied binary? I know that approaches like Powershell which has understanding of all the Microsoft commands and the ability to define a structure that defines the options ... but how would bash figure out the structure of the arguments for dd or tar or that a.out that I just compiled? |
|
Applications already come with lots of metadata: man pages, icon, readable name, ... adding formal shell-completion information is just another one.
Besides that, the built-in command line tools already have auto-completion for their arguments. Though I think they do it by running scripts at shell startup, which isn't exactly the mechanism I would have used... but it works.
In your case, "that a.out I just compiled", this metadata would be missing, so no shell completion for you. But that is a niche use case anyway, and not at all what this post is about.