summaryrefslogtreecommitdiff
path: root/plugins/capistrano
diff options
context:
space:
mode:
authorErwan ROUSSEL <erwan.roussel51@gmail.com>2018-11-01 15:29:05 +0100
committerMarc Cornellà <marc.cornella@live.com>2018-11-01 15:29:05 +0100
commit5c91cfcb061aafbffe7b60f22c23a3ed580fdf2a (patch)
tree6c2bb1216ec0b97d851473582d0c77ebfe1cdaf5 /plugins/capistrano
parent78935f7cf74e5092002dc66df875879aea502c86 (diff)
downloadzsh-5c91cfcb061aafbffe7b60f22c23a3ed580fdf2a.tar.gz
zsh-5c91cfcb061aafbffe7b60f22c23a3ed580fdf2a.tar.bz2
zsh-5c91cfcb061aafbffe7b60f22c23a3ed580fdf2a.zip
capistrano: add README (#7376)
Diffstat (limited to 'plugins/capistrano')
-rw-r--r--plugins/capistrano/README.md14
-rw-r--r--plugins/capistrano/capistrano.plugin.zsh4
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 $*