zsh-users
 help / color / mirror / code / Atom feed
From: James Devenish <j-devenish@users.sourceforge.net>
To: zsh-users@sunsite.dk
Cc: David Lebel <lebel@openbsd.org>
Subject: Refactoring _bsd_pkg
Date: Thu, 2 Jan 2003 22:04:12 +0800	[thread overview]
Message-ID: <20030102140412.GG2863@gulag.guild.uwa.edu.au> (raw)

[-- Attachment #1: Type: text/plain, Size: 957 bytes --]

Hi,

Is anyone using _bsd_pkg with OpenBSD 3.x?

The platform for which _bsd_pkg is relevant to me is OpenBSD.  Until
today, I hadn't realised that _bsd_pkg even existed.  Having just tried
it, I think the reason I didn't notice is that it behave{s,d} incorrectly
and therefore I didn't realised that something intelligent was at work.
Also, I notice that the OpenBSD ports tree contains a patch that I can't
see in zsh CVS HEAD. I have attached the completion function that I have
been using for pkg_delete and pkg_info. Mine is concise, partly because
it does not support pkg_add, pkg_create, or other BSDs. However, there
are some salient differences. Having downloaded the _bsd_pkg HEAD, it
appears that there are some errors in it from the OpenBSD perspective
(as in previous versions). I don't know whether this is because other
BSDs are different or because no one has noticed.

Is anyone aware of these sorts of things or is it only my perception?


[-- Attachment #2: _ports_pkg --]
[-- Type: text/plain, Size: 1831 bytes --]

#compdef pkg_delete pkg_info

# Thanks to the OpenBSD man pages for pkg_delete(1) and pkg_info(1)
# (whence comes the switch documentation).

local _pkg_delete_options _pkg_info_options _package

_pkg_delete_options=(
	'-v[Turn on verbose output]' \
	'-D[Do not execute deinstallation script]' \
	'-d[Remove left-over empty directories]' \
	'-n[Don''t deinstall, just report the steps to be taken]' \
	'-f[Force, even if script failed or dependency exists]' \
	'-p[Use this installation prefix if none specified by package]:directory:_files -/' \
	'*:installed package:_package'
)

_pkg_info_options=(
	'(* -)-a[Show information for all currently installed packages]' \
	'-c[Show the one-line comment field for each package]' \
	'-D[Show the install-message file (if any) for each package]' \
	'-d[Show the long-description field for each package]' \
	'-e[Test for the presence of another package]:prerequisite package:_package' \
	'-f[Show the packing list instructions for each package]' \
	'-I[Show the index entry for each package]' \
	'-i[Show the install script (if any) for each package]' \
	'-k[Show the de-install script (if any) for each package]' \
	'-L[Show the files within each package (installed pathnames)]' \
	'-l[Prefix each information category header]:directory:_files -/' \
	'-m[Show the mtree file (if any) for each package]' \
	'-p[Show the installation prefix for each package]' \
	'-q[Be "quiet", just dump raw info]' \
	'-R[Show which packages require a given package]' \
	'-r[Show the requirements script (if any) for each package]' \
	'-v[Turn on verbose output]' \
	'*:installed package:_package'
)

_package() {
	_values /var/db/pkg/*(-/:t)
}

case "$service" in
pkg_delete)
	_arguments -s "$_pkg_delete_options[@]" && return 0
;;
pkg_info)
	_arguments -s "$_pkg_info_options[@]" && return 0
;;
esac


             reply	other threads:[~2003-01-02 14:04 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-02 14:04 James Devenish [this message]
2003-01-02 14:41 ` Oliver Kiddle
2003-01-02 15:37   ` James Devenish
2003-01-03  8:39 ` Proposed changes to _bsd_pkg -- request for comments James Devenish
2003-01-03  9:14   ` Roman Neuhauser
2003-01-03 10:19   ` Phil Pennock
2003-01-03 10:30     ` James Devenish

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030102140412.GG2863@gulag.guild.uwa.edu.au \
    --to=j-devenish@users.sourceforge.net \
    --cc=lebel@openbsd.org \
    --cc=zsh-users@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).