-
-
Notifications
You must be signed in to change notification settings - Fork 607
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature:- AUTO TAB completion of flags #1402
Comments
Not sure it is possible, because completion is scope of bash/terminal |
something like this may possible - omelette |
I am trying to implement this with yargs completion |
We are moving away from yargs #1347, don't |
@anshumanv any suggestions other than omelette |
tabtab is another option. |
We can't have it unless we move to new arg parser and start using flags from webpack core. |
This issue had no activity for at least half a year. It's subject to automatic issue closing if there is no activity in the next 15 days. |
Issue was closed because of inactivity. If you think this is still a valid issue, please file a new issue with additional information. |
This issue had no activity for at least half a year. It's subject to automatic issue closing if there is no activity in the next 15 days. |
bump |
This issue had no activity for at least half a year. It's subject to automatic issue closing if there is no activity in the next 15 days. |
bump |
This issue had no activity for at least half a year. It's subject to automatic issue closing if there is no activity in the next 15 days. |
Issue was closed because of inactivity. If you think this is still a valid issue, please file a new issue with additional information. |
@snitin315 can I work on this issue or this issue is close due to inactivity ? |
@aialok feel free to work on it. |
Hello @snitin315 sir , |
Relative: tj/commander.js#385 (comment) |
Is the use of omelette good enough or tabtab be used? |
@alexander-akait what can be the best way to get all the flags that are built in webpack-cli, according to you. |
You can get them using commander API |
Expanding on the API which is available, some deeper detail. A
Both can be supported by hand fairly easily. Or you can optionally use the Help object to give you a list of the visible options for a command, which handles these two cases. e.g. import { Command, Option } from 'commander';
const program = new Command();
program.option('-d, --debug', 'output extra debugging');
program.addOption(new Option('-s, --secret', 'internal use only').hideHelp());
console.log('options array');
console.log(program.options.map(o => o.flags));
console.log('visible options');
const helper = program.createHelp();
console.log(helper.visibleOptions(program).map(o => o.flags)); % node index.mjs
options array
[ '-d, --debug', '-s, --secret' ]
visible options
[ '-d, --debug', '-h, --help' ] |
The type of approach sir @shadowspawn proposed definitely could have been a choice for solving this issue and if fact this approach is also being used in the CLI to get options for help command to output. However, this approach has an issue in this case. The webpack-cli when executed runs under the hood a method This needs to be fixed or we will have to take any other approach. I welcome any suggestions from community as it will definitely speed up the process. |
@HyperDanisH please in which file/folder should this be added to? |
What be added? |
The Auto-Tab completion feature |
I think you need to check pr related to this issue that is draft I made. |
Oh alright, I have seen it . |
@urizennnn ask me on discord in case you have any query about this pr. I am willing to help. |
can i have the link please, because i am invested in this even if it's outside the scope of gsoc. |
If you are asking about mine discord then it's username is danisharora and if webpack team's then follow this url |
@alexander-akait sir I would apreciate your opinion before I proceed any further. What do you think about this? |
both aren't bad |
Is your feature request related to a problem? Please describe.
when you type some cli flags and press TAB key. It doesn't autocomplete the flags. It should complete the flags automatically as per user input.
Describe the solution you'd like
I want the flags to autocomplete when i type some partial text of a flag just like in node REPL mode.
Describe alternatives you've considered
Additional context
The text was updated successfully, but these errors were encountered: