@@ -18,7 +18,7 @@ async function checkCliHasCompletions(
1818 timeout : 1000 ,
1919 } ) ;
2020 if ( result . trim ( ) ) return true ;
21- } catch { }
21+ } catch { }
2222
2323 try {
2424 const result = execSync ( `${ packageManager } ${ cliName } complete --` , {
@@ -42,22 +42,28 @@ async function getCliCompletions(
4242 ) ;
4343
4444 try {
45- const result = execSync ( `${ cliName } complete -- ${ completeArgs . join ( ' ' ) } ` , {
46- encoding : 'utf8' ,
47- stdio : [ 'pipe' , 'pipe' , 'ignore' ] ,
48- timeout : 1000 ,
49- } ) ;
45+ const result = execSync (
46+ `${ cliName } complete -- ${ completeArgs . join ( ' ' ) } ` ,
47+ {
48+ encoding : 'utf8' ,
49+ stdio : [ 'pipe' , 'pipe' , 'ignore' ] ,
50+ timeout : 1000 ,
51+ }
52+ ) ;
5053 if ( result . trim ( ) ) {
5154 return result . trim ( ) . split ( '\n' ) . filter ( Boolean ) ;
5255 }
53- } catch { }
56+ } catch { }
5457
5558 try {
56- const result = execSync ( `${ packageManager } ${ cliName } complete -- ${ completeArgs . join ( ' ' ) } ` , {
57- encoding : 'utf8' ,
58- stdio : [ 'pipe' , 'pipe' , 'ignore' ] ,
59- timeout : 1000 ,
60- } ) ;
59+ const result = execSync (
60+ `${ packageManager } ${ cliName } complete -- ${ completeArgs . join ( ' ' ) } ` ,
61+ {
62+ encoding : 'utf8' ,
63+ stdio : [ 'pipe' , 'pipe' , 'ignore' ] ,
64+ timeout : 1000 ,
65+ }
66+ ) ;
6167 return result . trim ( ) . split ( '\n' ) . filter ( Boolean ) ;
6268 } catch {
6369 return [ ] ;
@@ -107,7 +113,9 @@ export class PackageManagerCompletion extends RootCommand {
107113 ) ;
108114
109115 if ( suggestions . length > 0 ) {
110- debugLog ( `Returning ${ suggestions . length } completions for ${ potentialCliName } ` ) ;
116+ debugLog (
117+ `Returning ${ suggestions . length } completions for ${ potentialCliName } `
118+ ) ;
111119 for ( const suggestion of suggestions ) {
112120 if ( suggestion . startsWith ( ':' ) ) continue ;
113121 if ( suggestion . includes ( '\t' ) ) {
0 commit comments