zsh-users
 help / color / mirror / code / Atom feed
From: Stefan `Sec` Zehl <sec@42.org>
To: zsh-users@math.gatech.edu
Subject: relative filename completion
Date: Thu, 19 Feb 1998 23:14:05 +0100	[thread overview]
Message-ID: <19980219231405.M8189@matrix.42.org> (raw)

I'm trying to get 'relative filename completion' to work - i.e. a
filename completion which doesnt work relative to '.', but relative to
some other Directory. ("compctl -g '~/Mail/*(:t)' mutt" is not able to
complete in subdirs). So far i tried various things, and the closest i
could come up with was:
compctl -g '~/Mail/**/*(:s_/home/sec/Mail/__)' mutt

I was told to look at "Functions/cdmatch" but that didn't work very
well, too:

compctl -K gkomp g

gkomp () {
        setopt localoptions
        local narg pref cdp
        read -nc narg
        read -Ac pref
        cdp=(~/Mail) 
        reply=(${^cdp}/${pref[$narg]%$2}*$2(-DN^M:t)) 
}

It offers me all files/directories in ~/Mail, but I'm not able to complete
files in one of these directories.

If anybody could help me here?

CU,
    Sec
-- 
   Win16, Win32s, Win32c, Win32 - Which API do you want to go today?            


             reply	other threads:[~1998-02-19 22:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-02-19 22:14 Stefan `Sec` Zehl [this message]
1998-02-20  8:51 ` Peter Stephenson

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=19980219231405.M8189@matrix.42.org \
    --to=sec@42.org \
    --cc=zsh-users@math.gatech.edu \
    /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).