From: Oliver Kiddle <okiddle@yahoo.co.uk>
To: James Devenish <j-devenish@users.sourceforge.net>
Cc: zsh-workers@sunsite.dk
Subject: Re: Refactoring _bsd_pkg
Date: Thu, 02 Jan 2003 18:21:22 +0100 [thread overview]
Message-ID: <3190.1041528082@finches.logica.co.uk> (raw)
In-Reply-To: <20030102153706.GA7459@gulag.guild.uwa.edu.au>
On 2 Jan, James Devenish wrote:
> Yes, that's fine, I have attached a diff for the beast, only improving
Thanks
> pkd_delete, and pkg_info. I also replaced tabs with spaces since the
> file seemed to have a mixture, and that's made the patch a bit large.
> This is just a heads-up and I don't really intent on anyone feeling
> willing to commit this verbatim -- it's night-time here and I'll have
I've had a cursory glance through it and it all looks fine to me. Can
$(arch -s) be safely replaced by $MACHTYPE?
When you've got it to a point you're happy with, let me know and it can
then be committed.
> another look at it tomorrow. (And the person with the CC of my post is
> the OpenBSD port maintainer for zsh, so he may have something useful to
> add.)
Except I got a delivery failure for him so he may not see the whole
conversation.
> pkg_add still doesn't work quite right because it always has some
> directories (those matching the pattern /*) in the completion list,
> even if my current directory is not /.
This is in _bsd_pkg_pkgfiles() right?
This bit looks suspicious:
paths=( "${(@)${(@s.:.)PKG_PATH}:#}" )
_files "$@" -g '*.t[bg]z' && ret=0
(( $#path )) && _files "$@" -W paths -g '*.t[bg]z' && ret=0
compadd "$@" - $pkgsdir/*.t[bg]z && ret=0
The paths= line results in $paths containing a single empty element if
PKG_PATH is not set. Does PKG_PATH have a default value?
And shouldn't
(( $#path )) &&
be
(( $#paths )) &&
Can you do the whole thing as one _files line, something like this:
paths=( . $pkgsdir ${(s.:.)PKG_PATH} )
_files "$@" -W paths -g '*.t[bg]z'
> PS. I replaced '\'' with '', but maybe that's not portable? Also, I
That depends on the rcquotes option. You can only depend on those options
listed in $_comp_options (of which rcquotes is not one). I tend to stick
the whole line in double quotes to make it more readable.
Oliver
This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.
next parent reply other threads:[~2003-01-02 17:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20030102140412.GG2863@gulag.guild.uwa.edu.au>
[not found] ` <2419.1041518512@finches.logica.co.uk>
[not found] ` <20030102153706.GA7459@gulag.guild.uwa.edu.au>
2003-01-02 17:21 ` Oliver Kiddle [this message]
2003-01-02 17:34 ` 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=3190.1041528082@finches.logica.co.uk \
--to=okiddle@yahoo.co.uk \
--cc=j-devenish@users.sourceforge.net \
--cc=zsh-workers@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).