Package: vim-addon-manager
Version: 0.4
Severity: normal
Tags: patch

please add  zsh completion module into your package.
For using together with  zsh it is necessary to move the file to the
directory zsh_share:/functions/Completion/Debian. 

I don't know where  is better to send the mail: about vim-addon-manager
package or about zsh package. If I sent incorrectly please make a
reassign :)

sincerely Yours, Dmitry

-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing')
Architecture: i386 (i686)

Kernel: Linux 2.6.18-4-k7 (SMP w/1 CPU core)
Locale: LANG=ru_RU.UTF-8, LC_CTYPE=ru_RU.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages vim-addon-manager depends on:
ii  ruby                         1.8.2-1     An interpreter of object-oriented 
ii  vim-common                   1:7.1-138+1 Vi IMproved - Common files

Versions of packages vim-addon-manager recommends:
ii  vim                          1:7.1-138+1 Vi IMproved - enhanced vi editor
ii  vim-gtk [gvim]               1:7.1-138+1 Vi IMproved - enhanced vi editor -
ii  vim-tiny                     1:7.1-138+1 Vi IMproved - enhanced vi editor -

-- no debconf information
#compdef vim-addons

# Description: zsh completion module for vim-addons
#
# Copyright (C) by Dmitry E. Oboukhov <[EMAIL PROTECTED]>, 2007
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This package is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this package; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA

_vim_addons_which_verify()
{
  if which vim-addons &>/dev/null; then
    return 1
  else
    return 0
  fi
}

_vim_addons_avail_list()
{
  _vim_addons_which_verify && return
  local avtmp _vim_addons_avail_list
  _vim_addons_avail_list=()
  vim-addons status|tail -n +2|awk '{print $1}'| while read avtmp; do
    _vim_addons_avail_list+=$avtmp
  done
  compadd $_vim_addons_avail_list
}

_vim_addons_installed_list()
{
  _vim_addons_which_verify && return
  local aitmp _vim_addons_installed_list
  _vim_addons_installed_list=()
  vim-addons status|tail -n +2|awk '{print $1, $2}'|grep -v 'removed$' \
  |awk '{print $1}'|while read aitmp; do
    _vim_addons_installed_list+=$aitmp
  done
  compadd $_vim_addons_installed_list
}

_vim-addons()
{
  local -a arguments
  local state line cmds

  arguments=(
    '(--help -h)'{--help,-h}'[show usage message and exit]'
    '(--query -q)'{--query,-q}'[be quiet and make the output more parseable]'
    '(--registry-dir -r)'{--registry-dir,-r}'[set the registry directory]:directory:_directories'
    '(--source-dir -s)'{--source-dir,-s}'[set the addons source directory]:directory:_directories'
    '(--target-dir -t)'{--target-dir,-t}'[set the addons target directory]:directory:_directories'
    '(--verbose -v)'{--verbose,-v}'[increase verbosity]'
    '(--system-dir -y)'{--system-dir,-y}'[set the system-wide target directory]:directory:_directories'
    '(--system-wide -w)'{--system-wide,-w}'[set target directory to the system-wide one]::directory:_directories'
    '1: :->cmds'
    '*: :->args'

  )
  _arguments -S $arguments

  case $state in
    cmds)
      cmds=(
        'list: list the names of the addons available in the system'
        'install: install  one  or more addons under ~/.vim'
        'remove: remove one or more addons from ~/.vim.'
        'status: list the status of the addons  available in the system'
        'disable: disable  one or more addons to be used by the current user'
        'amend: undo  the  effects  of  a  previous disable command'
        'files: list the files composing  the  specified  addons'
        'show: displays detailed information about the specified addons'
      )
    _describe -t commands 'vim-addons command' cmds && ret=0
    ;;

    args)
      case $line[1] in
        list)
          # do nothing
        ;;

        install|status|files|show|amend)
          _vim_addons_avail_list
        ;;

        remove|disable)
          _vim_addons_installed_list
        ;;
      esac
    ;;
  esac

}

_vim-addons "$@"


Reply via email to