ea274ab90c1a6d7f553e44ad7138f6205336b3b4

Author
Fedyashev Nikita <loci.master@gmail.com>
Committer
Fedyashev Nikita <loci.master@gmail.com>
Date

Message

fixed formatting; dead code deleted

Diff

This diff is truncated to protect this page.

  1diff --git a/plugins/vagrant/_vagrant b/plugins/vagrant/_vagrant
  2index 4cd6a46d22d11b6b67ce3af97dad5f8a888bd568..ea7fd5f7457178103196733caf29f5bae56cbf84 100644
  3--- a/plugins/vagrant/_vagrant
  4+++ b/plugins/vagrant/_vagrant
  5@@ -5,134 +5,103 @@
  6 
  7 __task_list ()
  8 {
  9-  local expl
 10-  declare -a tasks
 11+    local expl
 12+    declare -a tasks
 13 
 14-  tasks=(box destroy halt init package provision reload resume ssh ssh_config status suspend up version)
 15+    tasks=(box destroy halt init package provision reload resume ssh ssh_config status suspend up version)
 16 
 17-  _wanted tasks expl 'help' compadd $tasks
 18+    _wanted tasks expl 'help' compadd $tasks
 19 }
 20 
 21 __box_list ()
 22 {
 23-  _wanted application expl 'hxlp' compadd $(command ls -1 $HOME/.vagrant/boxes 2>/dev/null| sed -e 's/ /\\ /g')
 24+    _wanted application expl 'command' compadd $(command ls -1 $HOME/.vagrant/boxes 2>/dev/null| sed -e 's/ /\\ /g')
 25 }
 26 
 27 __vagrant-box ()
 28 {
 29- local curcontext="$curcontext" state line
 30-        typeset -A opt_args
 31+    local curcontext="$curcontext" state line
 32+    typeset -A opt_args
 33 
 34-        _arguments -C \
 35-		':command:->command' \
 36-		'*::options:->options'
 37-
 38-        case $state in
 39-                (command)
 40-
 41-                       # local -a subcommands
 42-                       # subcommands=(
 43-                       #         'start:Start a new release branch'
 44-                       #         'finish:Finish a release branche.'
 45-                       #         'list:List all your release branches. (Alias to `git flow release`)'
 46-                       # )
 47-                       # _describe -t commands 'git flow release' subcommands
 48-                       # _arguments \
 49-                       # -v'[Verbose (more) output]'
 50-       _describe -t commands "gem subcommand" _box_arguments
 51-       return
 52-                ;;
 53-
 54-                (options)
 55-                        case $line[1] in
 56-
 57-                                (repackage)
 58-				       _arguments \
 59-						-F'[Fetch from origin before performing finish]' \
 60-						-r'[Rebase instead of merge]'\
 61-							':feature:__box_list' 
 62-
 63-
 64-
 65-                                ;;
 66-                        esac
 67-                ;;
 68-         esac
 69+    _arguments -C \
 70+        ':command:->command' \
 71+        '*::options:->options'
 72 
 73+   case $state in
 74+       (command)
 75+           _describe -t commands "gem subcommand" _box_arguments
 76+           return
 77+       ;;
 78+
 79+       (options)
 80+           case $line[1] in
 81+               (repackage|remove)
 82+                   _arguments \
 83+                       -F'[Fetch from origin before performing finish]' \
 84+                       -r'[Rebase instead of merge]'\
 85+                         ':feature:__box_list' 
 86+               ;;
 87+           esac
 88+       ;;
 89+    esac
 90 }
 91 
 92 local -a _1st_arguments
 93 _1st_arguments=(
 94-  'box:Box commands'
 95-  'destroy:Destroys the vagrant environment'
 96-  'halt:Halts the currently running vagrant environment'
 97-  'help:[TASK] Describe available tasks or one specific task'
 98-  'init:[box_name] [box_url] Initializes current folder for Vagrant usage'
 99-  'package:Packages a vagrant environment for distribution'
100-  'provision:Run the provisioner'
101-  'reload:Reload the vagrant environment'
102-  'resume:Resumes a suspend vagrant environment'
103-  'ssh:SSH into the currently running environment'
104-  'ssh_config:outputs .ssh/config valid syntax for connecting to this environment via ssh.'