Skip to content

Command line tool for “Can I Use …” and MDN Browser Compat Data

License

Notifications You must be signed in to change notification settings

bramus/caniuse-cli

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

97 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@bramus/caniuse-cli

Command line tool for “Can I Use …” and MDN Browser Compat Data

npm NPM

caniuse-cli screenshot

Features

Installation

# npm install -g @bramus/caniuse-cli

Usage

$ caniuse viewport-units
$ caniuse "viewport units"
$ caniuse @property

Enable Tab Autocompletion

In zsh:

echo '. <(caniuse --completion)' >> ~/.zshrc

In bash:

caniuse --completion >> ~/.caniuse.completion.sh
echo 'source ~/.caniuse.completion.sh' >> ~/.bashrc

In fish:

echo 'caniuse --completion-fish | source' >> ~/.config/fish/config.fish

That's all!

Now you have an autocompletion system.

Possible issues

Missing bash-completion package

bash: _get_comp_words_by_ref: command not found
bash: __ltrim_colon_completions: command not found
bash: _get_comp_words_by_ref: command not found
bash: __ltrim_colon_completions: command not found

Solution: install bash-completion package

License

@bramus/caniuse-cli is released under the MIT public license. See the enclosed LICENSE for details.

Acknowledgements

This project is built on the original https://github.com/dsenkus/caniuse-cli/