diff options
author | Tuowen Zhao <ztuowen@gmail.com> | 2019-01-31 17:25:13 -0700 |
---|---|---|
committer | Tuowen Zhao <ztuowen@gmail.com> | 2019-01-31 17:25:13 -0700 |
commit | 89c9e8a7bc177d4cff6ba8d28cf6b57a9a603095 (patch) | |
tree | 0a301691b8481163680454a1f07ca54115ec17eb /plugins/capistrano | |
parent | 075160b86c64045e661209ad7906559068b44104 (diff) | |
parent | 851899e59ea71ce8fbae738ec7aeb7a967585977 (diff) | |
download | zsh-89c9e8a7bc177d4cff6ba8d28cf6b57a9a603095.tar.gz zsh-89c9e8a7bc177d4cff6ba8d28cf6b57a9a603095.tar.bz2 zsh-89c9e8a7bc177d4cff6ba8d28cf6b57a9a603095.zip |
Merge branch 'master' of https://github.com/robbyrussell/oh-my-zsh
Diffstat (limited to 'plugins/capistrano')
-rw-r--r-- | plugins/capistrano/README.md | 14 | ||||
-rw-r--r-- | plugins/capistrano/capistrano.plugin.zsh | 4 |
2 files changed, 16 insertions, 2 deletions
diff --git a/plugins/capistrano/README.md b/plugins/capistrano/README.md new file mode 100644 index 000000000..335b794fa --- /dev/null +++ b/plugins/capistrano/README.md @@ -0,0 +1,14 @@ +# Capistrano + +This plugin provides completion for [Capistrano](https://capistranorb.com/). + +To use it add capistrano to the plugins array in your zshrc file. + +```bash +plugins=(... capistrano) +``` + +For a working completion use the `capit` command instead of `cap`, because cap is a +[reserved word in zsh](http://zsh.sourceforge.net/Doc/Release/Zsh-Modules.html#The-zsh_002fcap-Module). + +`capit` automatically runs cap with bundler if a Gemfile is found. diff --git a/plugins/capistrano/capistrano.plugin.zsh b/plugins/capistrano/capistrano.plugin.zsh index 0b5559791..819572825 100644 --- a/plugins/capistrano/capistrano.plugin.zsh +++ b/plugins/capistrano/capistrano.plugin.zsh @@ -1,7 +1,7 @@ -# Added `shipit` because `cap` is a reserved word. `cap` completion doesn't work. +# Added `capit` because `cap` is a reserved word. `cap` completion doesn't work. # http://zsh.sourceforge.net/Doc/Release/Zsh-Modules.html#The-zsh_002fcap-Module -func capit() { +function capit() { if [ -f Gemfile ] then bundle exec cap $* |