CLIFramework
CLIFramework copied to clipboard
Removing Commands from Completion Generator
Is there a way make commands not show up in the shell completion scripts?
There is a hidden property in the command class. I think we can use that flag to update the completion generator
I've done some poking around without much luck. I noticed the hidden property you're talking about but it's really only ever used by the aggregate() method on the CommandBase class.
In the generateCommandCompletionRecursively() method of BashGenerator I tried skipping any commands (such as what's in the dev group) but they're still autocompleting. After doing this my completion script is definitely missing commands such as compile and archive but yet they're still autocompleting.
There's nothing that happens real time for auto completion, is there? As in does the script inspect the .phar file on the fly to determine available commands?
The command name completion is done statically, expect the argument name and the option value.
arg and opt values are completed through the meta command, the script ask the meta command to get some information
paco3346 [email protected]於 2017年5月5日 週五,03:03寫道:
I've done some poking around without much luck. I noticed the hidden property you're talking about but it's really only ever used by the aggregate() method on the CommandBase class.
In the generateCommandCompletionRecursively() method of BashGenerator I tried skipping any commands (such as what's in the dev group) but they're still autocompleting. After doing this my completion script is definitely missing commands such as compile and archive but yet they're still autocompleting.
There's nothing that happens real time for auto completion, is there? As in does the script inspect the .phar file on the fly to determine available commands?
— You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/c9s/CLIFramework/issues/102#issuecomment-299279242, or mute the thread https://github.com/notifications/unsubscribe-auth/AADGziDWH4GmpMDSg3iewEiVdVMEyqkRks5r2iEKgaJpZM4NQ9cF .