You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 607a723
Browse filesBrowse the repository at this point in the historyBrowse files
feat(@angular/cli): add support for auto completion
To enable bash and zsh real-time type-ahead autocompletion, copy and paste the generated script by the `ng completion` command to your `.bashrc`, `.bash_profile`, `.zshrc` or `.zsh_profile`.
Closes#11043
@@ -42,10 +47,15 @@ export abstract class ArchitectCommandModule
42
47
`For more information, see https://angular.io/guide/workspace-config#alternate-build-configurations.`,
43
48
alias: 'c',
44
49
type: 'string',
50
+
// Show only in when using --help and auto completion because otherwise comma seperated configuration values will be invalid.
51
+
// Also, hide choices from JSON help so that we don't display them in AIO.
52
+
choices:
53
+
(getYargsCompletions||help)&&!jsonHelp&&project
54
+
? this.getConfigurationChoices(project)
55
+
: undefined,
45
56
})
46
57
.strict();
47
58
48
-
constproject=this.getArchitectProject();
49
59
if(!project){
50
60
returnlocalYargs;
51
61
}
@@ -92,11 +102,7 @@ export abstract class ArchitectCommandModule
92
102
const[,projectName]=this.context.args.positional;
93
103
94
104
if(projectName){
95
-
if(!workspace.projects.has(projectName)){
96
-
thrownewCommandModuleError(`Project '${projectName}' does not exist.`);
To enable bash and zsh real-time type-ahead autocompletion, copy and paste the generated script to your `.bashrc`, `.bash_profile`, `.zshrc` or `.zsh_profile`.
0 commit comments