A simple oh-my-zsh plugin that provides handy aliases for Apache Cordova commands, inspired by git-style shortcuts (gco, gcb, etc).
| Command | Alias |
|---|---|
cordova |
cdv |
cordova build |
cdvb |
cordova run |
cdvr |
cordova emulate |
cdve |
cordova build android |
cdvba |
cordova build ios |
cdvbi |
cordova run android |
cdvra |
cordova run ios |
cdvri |
cordova emulate android |
cdvea |
cordova emulate ios |
cdvei |
cordova prepare |
cdvp |
cordova compile |
cdvc |
cordova serve |
cdvs |
cordova platform |
cdvpf |
cordova platform add |
cdvpfa |
cordova platform rm |
cdvpfr |
cordova platform update |
cdvpfu |
cordova plugin |
cdvpl |
cordova plugin add |
cdvpla |
cordova plugin rm |
cdvplr |
cordova plugin update |
cdvplu |
cordova plugin list |
cdvpll |
cordova requirements |
cdvreq |
cordova requirements android |
cdvreqa |
cordova requirements ios |
cdvreqi |
cordova create |
cdvcre |
cordova clean |
cdvclean |
cordova info |
cdvinfo |
cordova telemetry |
cdvtel |
This plugin includes a _cordova completion file that enables tab-completion for both the cdv alias and the cordova command.
Supported completions:
- Subcommands (
build,run,platform,plugin, etc.) - Platform names (
android,ios,browser) - Platform subcommands (
add,rm,update,list,check) - Plugin subcommands (
add,rm,update,list,search) - Global flags (
--verbose,--no-telemetry,--version,--help)
Completion is loaded automatically when the plugin directory is on your $fpath (handled by oh-my-zsh and most plugin managers). If completions are not working, run:
rm -f ~/.zcompdump && exec zshClone this repo into your oh-my-zsh custom plugins folder:
git clone https://github.com/andredestro/cordova-zsh-plugin.git ~/.oh-my-zsh/custom/plugins/cordovaThen enable it in your ~/.zshrc:
plugins=(git cordova)Reload zsh:
source ~/.zshrcIf you use Zinit:
zinit light andredestro/cordova-zsh-pluginIf you use Antigen:
antigen bundle andredestro/cordova-zsh-pluginIf you use Zplug:
zplug "andredestro/cordova-zsh-plugin"If you use Homebrew:
brew tap andredestro/tap
brew install cordova-zsh-pluginThen add the following to your ~/.zshrc:
source "$(brew --prefix)/share/cordova-zsh-plugin/cordova.plugin.zsh"Reload zsh:
source ~/.zshrcTab completion is installed automatically to $(brew --prefix)/share/zsh/site-functions/_cordova.
cordova: command not found
Cordova is not installed or not in your $PATH. Install it via npm:
npm install -g cordovacdv: command not found
The plugin is not loaded. Verify that:
- The plugin is cloned to
~/.oh-my-zsh/custom/plugins/cordova/ cordovais listed in yourpluginsarray in~/.zshrc- You have reloaded your shell with
source ~/.zshrc
Open a new terminal or run:
source ~/.zshrcRebuild the zsh compdump file:
rm -f ~/.zcompdump && exec zshPull requests are welcome! Feel free to suggest new aliases or improvements.
MIT