Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: compsys issues
- X-seq: zsh-users 8138
- From: DervishD <zsh@xxxxxxxxxxxx>
- To: Oliver Kiddle <okiddle@xxxxxxxxxxx>
- Subject: Re: compsys issues
- Date: Wed, 27 Oct 2004 18:44:29 +0200
- Cc: Zsh Users <zsh-users@xxxxxxxxxx>
- In-reply-to: <15603.1098886106@xxxxxxxxxxxxxxxxxxxxx>
- Mail-followup-to: Oliver Kiddle <okiddle@xxxxxxxxxxx>, Zsh Users <zsh-users@xxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- Organization: DervishD
- References: <20041027132610.GA9928@DervishD> <15603.1098886106@xxxxxxxxxxxxxxxxxxxxx>
Hi Oliver :)
* Oliver Kiddle <okiddle@xxxxxxxxxxx> dixit:
> compadd -W $PWD/$IPREFIX -f - $IPREFIX*(/:t)
>
> That won't work with paths starting with variable expansions or
> non-relative directories. You'll need more logic to work out the
> argument to -W. Using $~IPREFIX will help resolve any expansions on the
> command line.
Just to make sure I've understood, if I want to make it work with
absolute and relative pathnames (I'll get into variable expansions
after that), I should do something like:
compset -P '*/'
PREPATH="$PWD/"
[[ $IPREFIX[1] == "/" ]] && {
IPPREFIX=${IPPREFIX#/}
PREPATH="/"
}
compadd -W $PREPATH$IPREFIX -f - ${IPREFIX}*(:t)
Quick'n'dirty hack, but it should work, shouldn't it?
Thanks again, Oliver :)
Raúl Núñez de Arenas Coronado
--
Linux Registered User 88736
http://www.dervishd.net & http://www.pleyades.net/
Messages sorted by:
Reverse Date,
Date,
Thread,
Author