5c91cfcb061aafbffe7b60f22c23a3ed580fdf2a

Author
Erwan ROUSSEL <erwan.roussel51@gmail.com>
Committer
Marc Cornellà <marc.cornella@live.com>
Date

Message

capistrano: add README (#7376)

Diff

 1diff --git a/plugins/capistrano/README.md b/plugins/capistrano/README.md
 2new file mode 100644
 3index 0000000000000000000000000000000000000000..335b794faf5e34c29dcc314bc49b82d9a71e3ce8
 4--- /dev/null
 5+++ b/plugins/capistrano/README.md
 6@@ -0,0 +1,14 @@
 7+# Capistrano
 8+
 9+This plugin provides completion for [Capistrano](https://capistranorb.com/).
10+
11+To use it add capistrano to the plugins array in your zshrc file.
12+
13+```bash
14+plugins=(... capistrano)
15+```
16+
17+For a working completion use the `capit` command instead of `cap`, because cap is a
18+[reserved word in zsh](http://zsh.sourceforge.net/Doc/Release/Zsh-Modules.html#The-zsh_002fcap-Module).
19+
20+`capit` automatically runs cap with bundler if a Gemfile is found.
21diff --git a/plugins/capistrano/capistrano.plugin.zsh b/plugins/capistrano/capistrano.plugin.zsh
22index 0b555979122c213d1fb038049fc00ec192dcb2c6..81957282554e2be325431caa4fa9abda8c802ad4 100644
23--- a/plugins/capistrano/capistrano.plugin.zsh
24+++ b/plugins/capistrano/capistrano.plugin.zsh
25@@ -1,7 +1,7 @@
26-# Added `shipit` because `cap` is a reserved word. `cap` completion doesn't work.
27+# Added `capit` because `cap` is a reserved word. `cap` completion doesn't work.
28 # http://zsh.sourceforge.net/Doc/Release/Zsh-Modules.html#The-zsh_002fcap-Module
29 
30-func capit() {
31+function capit() {
32   if [ -f Gemfile ]
33   then
34     bundle exec cap $*