summaryrefslogtreecommitdiffstats
path: root/zsh/oh-my-zsh/plugins/capistrano
diff options
context:
space:
mode:
authorLibravatarLibravatar Biswakalyan Bhuyan <biswa@surgot.in> 2024-03-25 16:43:09 +0530
committerLibravatarLibravatar Biswakalyan Bhuyan <biswa@surgot.in> 2024-03-25 16:43:09 +0530
commita62114c91f2070c8c8453d117f3d81dc113e41ff (patch)
treef266e87af29a08c01f82bc32dd7d463d8ec4441a /zsh/oh-my-zsh/plugins/capistrano
parentaf120ab348f2e1a5a39dec035ed9dcf84189a64e (diff)
downloaddotfiles-a62114c91f2070c8c8453d117f3d81dc113e41ff.tar.gz
dotfiles-a62114c91f2070c8c8453d117f3d81dc113e41ff.tar.bz2
dotfiles-a62114c91f2070c8c8453d117f3d81dc113e41ff.zip
dotfile update
Diffstat (limited to 'zsh/oh-my-zsh/plugins/capistrano')
-rw-r--r--zsh/oh-my-zsh/plugins/capistrano/README.md14
-rw-r--r--zsh/oh-my-zsh/plugins/capistrano/_capistrano49
-rw-r--r--zsh/oh-my-zsh/plugins/capistrano/capistrano.plugin.zsh11
3 files changed, 0 insertions, 74 deletions
diff --git a/zsh/oh-my-zsh/plugins/capistrano/README.md b/zsh/oh-my-zsh/plugins/capistrano/README.md
deleted file mode 100644
index 335b794..0000000
--- a/zsh/oh-my-zsh/plugins/capistrano/README.md
+++ /dev/null
@@ -1,14 +0,0 @@
-# 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/zsh/oh-my-zsh/plugins/capistrano/_capistrano b/zsh/oh-my-zsh/plugins/capistrano/_capistrano
deleted file mode 100644
index a79e47b..0000000
--- a/zsh/oh-my-zsh/plugins/capistrano/_capistrano
+++ /dev/null
@@ -1,49 +0,0 @@
-#compdef capit
-#autoload
-
-# 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
-
-local curcontext="$curcontext" state line ret=1
-local -a _configs
-
-_arguments -C \
- '1: :->cmds' \
- '2:: :->args' && ret=0
-
-_cap_tasks() {
- if [[ -f config/deploy.rb || -f Capfile ]]; then
- if [[ ! -f .cap_tasks~ ]]; then
- capit --tasks | sed 's/\(\[\)\(.*\)\(\]\)/\2:/' | awk '{command=$2; $1=$2=$3=""; gsub(/^[ \t\r\n]+/, "", $0); gsub(":", "\\:", command); print command"["$0"]"}' > .cap_tasks~
- fi
-
- OLD_IFS=$IFS
- IFS=$'\n'
- _values 'cap commands' $(< .cap_tasks~)
- IFS=$OLD_IFS
- # zmodload zsh/mapfile
- # _values ${(f)mapfile[.cap_tasks~]}
- fi
-}
-
-_cap_stages() {
- compadd $(find config/deploy -name \*.rb | cut -d/ -f3 | sed s:.rb::g)
-}
-
-case $state in
- cmds)
- # check if it uses multistage
- if [[ -d config/deploy ]]; then
- _cap_stages
- else
- _cap_tasks
- fi
- ret=0
- ;;
- args)
- _cap_tasks
- ret=0
- ;;
-esac
-
-return ret
diff --git a/zsh/oh-my-zsh/plugins/capistrano/capistrano.plugin.zsh b/zsh/oh-my-zsh/plugins/capistrano/capistrano.plugin.zsh
deleted file mode 100644
index 8195728..0000000
--- a/zsh/oh-my-zsh/plugins/capistrano/capistrano.plugin.zsh
+++ /dev/null
@@ -1,11 +0,0 @@
-# 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
-
-function capit() {
- if [ -f Gemfile ]
- then
- bundle exec cap $*
- else
- cap $*
- fi
-}