Skip to content

Commit

Permalink
refactor(command): update completions description
Browse files Browse the repository at this point in the history
  • Loading branch information
c4spar committed Mar 31, 2020
1 parent 7d5d25e commit a3c5c72
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions packages/command/commands/completions.ts
Expand Up @@ -17,16 +17,27 @@ export class CompletionsCommand extends DefaultCommand {
${ dim( bold( 'Bash completions:' ) ) }
To enable bash completions for this program add following line to your ${ dim( italic( '~/.bashrc' ) ) }.
To enable bash completions for this program add following line to your ${ dim( italic( '~/.bashrc' ) ) }:
${ dim( italic( 'source <(command-name completions bash)' ) ) }
or create a separate file in the ${ dim( italic( 'bash_completion.d' ) ) } directory:
${ dim( italic( `${ parent.getPath() } completions bash > /usr/local/etc/bash_completion.d/${ parent.getPath() }.bash` ) ) }
${ dim( italic( `source /usr/local/etc/bash_completion.d/${ parent.getPath() }.bash` ) ) }
${ dim( bold( 'Zsh completions:' ) ) }
To enable zsh completions for this program add following line to your ${ dim( italic( '~/.zshrc' ) ) }.
To enable zsh completions for this program add following line to your ${ dim( italic( '~/.zshrc' ) ) }:
${ dim( italic( 'source <(command-name completions zsh)' ) ) }
or create a separate file in the ${ dim( italic( 'zsh_completion.d' ) ) } directory:
${ dim( italic( `${ parent.getPath() } completions zsh > /usr/local/etc/zsh_completion.d/${ parent.getPath() }.zsh` ) ) }
${ dim( italic( `source /usr/local/etc/zsh_completion.d/${ parent.getPath() }.zsh` ) ) }
` )

.default( 'help' )
.command( 'zsh', new ZshCompletionsCommand( this.parent ) )
.command( 'bash', new BashCompletionsCommand( this.parent ) )
Expand Down

0 comments on commit a3c5c72

Please sign in to comment.