swc/bundler/tests/.cache/deno/57f42cd79a814c6352880d2c86a215a83e34fa00.ts
강동윤 1178686a4c
fix(bundler): Fix bundler (#1576)
swc_bundler:
 - Fix remapping of exports. (denoland/deno#9350)
2021-04-16 18:09:38 +00:00

22 lines
670 B
TypeScript

// Loaded from https://deno.land/x/cliffy@v0.12.1/packages/command/commands/completions/zsh.ts
import { Command } from '../../lib/command.ts';
import { ZshCompletionsGenerator } from '../../lib/zsh-completions-generator.ts';
/**
* Generates zsh completion code.
*/
export class ZshCompletionsCommand extends Command {
public constructor( cmd?: Command ) {
super();
this.description( 'Generate zsh shell completions.' )
.action( () => {
Deno.stdout.writeSync( new TextEncoder().encode(
ZshCompletionsGenerator.generate( cmd || this.getMainCommand() )
) );
} );
}
}