This repository was archived by the owner on Feb 2, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed
Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ declare module Config {
22 interface IStaticConfig {
33 PROJECT_FILE_NAME : string ;
44 CLIENT_NAME : string ;
5+ CLIENT_NAME_ALIAS ?: string ;
56 ANALYTICS_API_KEY : string ;
67 version : string ;
78 helpTextPath : string ;
Original file line number Diff line number Diff line change @@ -70,8 +70,7 @@ export class CommandsService implements ICommandsService {
7070
7171 public completeCommand ( getPropSchemaAction ?: any ) : IFuture < any > {
7272 return ( ( ) => {
73- var tabtab = require ( "tabtab" ) ;
74- tabtab . complete ( this . $staticConfig . CLIENT_NAME , ( err : Error , data : any ) => {
73+ var completeCallback = ( err : Error , data : any ) => {
7574 if ( err || ! data ) {
7675 return ;
7776 }
@@ -121,7 +120,15 @@ export class CommandsService implements ICommandsService {
121120 }
122121
123122 return false ;
124- } ) ;
123+ } ;
124+
125+
126+ var tabtab = require ( "tabtab" ) ;
127+ tabtab . complete ( this . $staticConfig . CLIENT_NAME , completeCallback ) ;
128+
129+ if ( this . $staticConfig . CLIENT_NAME_ALIAS ) {
130+ tabtab . complete ( this . $staticConfig . CLIENT_NAME_ALIAS , completeCallback ) ;
131+ }
125132
126133 return true ;
127134 } ) . future < any > ( ) ( ) ;
You can’t perform that action at this time.
0 commit comments