Skip to content

Commit

Permalink
refactor(command): update description of completions command
Browse files Browse the repository at this point in the history
  • Loading branch information
c4spar committed Mar 22, 2020
1 parent 15a3fd5 commit 5feeb77
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion packages/command/commands/completions.ts
@@ -1,3 +1,4 @@
import { bold, dim, italic } from 'https://deno.land/std/fmt/colors.ts';
import { BaseCommand } from '../lib/base-command.ts';
import { DefaultCommand } from '../lib/default-command.ts';
import { BashCompletionsCommand } from './completions/bash.ts';
Expand All @@ -12,7 +13,20 @@ export class CompletionsCommand extends DefaultCommand {

super();

this.description( 'Generate shell completions for zsh and bash.' )
this.description( `Generate shell completions for zsh and bash.
${ dim( bold( 'Bash completions:' ) ) }
To enable bash completions for this program add following line to your ${ dim( italic( '~/.bashrc' ) ) }.
${ dim( italic( 'source <(command-name completions bash)' ) ) }
${ dim( bold( 'Zsh completions:' ) ) }
To enable zsh completions for this program add following line to your ${ dim( italic( '~/.zshrc' ) ) }.
${ dim( italic( 'source <(command-name completions zsh)' ) ) }
` )
.command( 'zsh', new ZshCompletionsCommand( this.parent ) )
.command( 'bash', new BashCompletionsCommand( this.parent ) )
.reset();
Expand Down

0 comments on commit 5feeb77

Please sign in to comment.