@@ -3,30 +3,30 @@ import { ShellCompDirective } from './t';
33// TODO: issue with -- -- completions
44
55export function generate (
6- name : string ,
7- exec : string ,
8- includeDesc = false
6+ name : string ,
7+ exec : string ,
8+ includeDesc = false
99) : string {
10- // Replace '-' and ':' with '_' for variable names
11- const nameForVar = name . replace ( / [ - : ] / g, '_' ) ;
12-
13- // Determine the completion command
14- // const compCmd = includeDesc ? "complete" : "complete";
15-
16- // Shell completion directives
17- const ShellCompDirectiveError = ShellCompDirective . ShellCompDirectiveError ;
18- const ShellCompDirectiveNoSpace =
19- ShellCompDirective . ShellCompDirectiveNoSpace ;
20- const ShellCompDirectiveNoFileComp =
21- ShellCompDirective . ShellCompDirectiveNoFileComp ;
22- const ShellCompDirectiveFilterFileExt =
23- ShellCompDirective . ShellCompDirectiveFilterFileExt ;
24- const ShellCompDirectiveFilterDirs =
25- ShellCompDirective . ShellCompDirectiveFilterDirs ;
26- const ShellCompDirectiveKeepOrder =
27- ShellCompDirective . ShellCompDirectiveKeepOrder ;
28-
29- return `# powershell completion for ${ name } -*- shell-script -*-
10+ // Replace '-' and ':' with '_' for variable names
11+ const nameForVar = name . replace ( / [ - : ] / g, '_' ) ;
12+
13+ // Determine the completion command
14+ // const compCmd = includeDesc ? "complete" : "complete";
15+
16+ // Shell completion directives
17+ const ShellCompDirectiveError = ShellCompDirective . ShellCompDirectiveError ;
18+ const ShellCompDirectiveNoSpace =
19+ ShellCompDirective . ShellCompDirectiveNoSpace ;
20+ const ShellCompDirectiveNoFileComp =
21+ ShellCompDirective . ShellCompDirectiveNoFileComp ;
22+ const ShellCompDirectiveFilterFileExt =
23+ ShellCompDirective . ShellCompDirectiveFilterFileExt ;
24+ const ShellCompDirectiveFilterDirs =
25+ ShellCompDirective . ShellCompDirectiveFilterDirs ;
26+ const ShellCompDirectiveKeepOrder =
27+ ShellCompDirective . ShellCompDirectiveKeepOrder ;
28+
29+ return `# powershell completion for ${ name } -*- shell-script -*-
3030
3131 [Console]::OutputEncoding = [System.Text.Encoding]::UTF8
3232 function __${ name } _debug {
0 commit comments