zsh-users
 help / color / mirror / code / Atom feed
From: DervishD <zsh@dervishd.net>
To: Oliver Kiddle <okiddle@yahoo.co.uk>
Cc: Zsh Users <zsh-users@sunsite.dk>
Subject: Re: compsys issues
Date: Wed, 27 Oct 2004 18:44:29 +0200	[thread overview]
Message-ID: <20041027164429.GA10361@DervishD> (raw)
In-Reply-To: <15603.1098886106@trentino.logica.co.uk>

    Hi Oliver :)

 * Oliver Kiddle <okiddle@yahoo.co.uk> 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/


      parent reply	other threads:[~2004-10-27 16:42 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-27 13:26 DervishD
2004-10-27 14:08 ` Oliver Kiddle
2004-10-27 14:54   ` DervishD
2004-10-27 15:43     ` Oliver Kiddle
2004-10-27 16:07       ` DervishD
2004-10-27 16:44   ` DervishD [this message]

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=20041027164429.GA10361@DervishD \
    --to=zsh@dervishd.net \
    --cc=okiddle@yahoo.co.uk \
    --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).