Skip to content

ronkot/shell-completion

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Shell Completion

So you've build a fantastic node.js CLI, and even took the effort of adding bash or zsh completion files! However, now you're telling your users to add the sourcing of this file to their .profile, or similair intialization script..

No need! Simply add:

npm install shell-completion --save

And in your package.json use shell-completion to install the completion files:

{ "scripts": {
  "postinstall": "install-completion bash myBashCompletion && install-completion zsh myZshCompletion"
} }

Shell-completion will link your completion files to the specified shell's and platform's default location.

Features

A pull request for Powershell support would be very welcome! Should be trivial for someone familiar with the platform

  • Supports Bash and Zsh
  • Supports Homebrew installation prefixes on OS X
  • Logs all errors if anything fails, but always exits without an error code. This means adding install-completion to your postinstall is completely safe, and will never break the rest of your application's installation!

Usage

  Usage: link [options] [command]

  Commands:

    bash <completionfile>  Link <completionfile> for usage in bash
    zsh <completionfile>   Link <completionfile> for usage in zshell

  Options:

    -h, --help     output usage information
    -V, --version  output the version number

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%