From: "Bart Schaefer" <schaefer@brasslantern.com>
To: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>,
zsh-workers@math.gatech.edu
Subject: Re: compctl -Tx 'w[0,...] ...' ...
Date: Mon, 29 Sep 1997 21:57:19 -0700 [thread overview]
Message-ID: <970929215720.ZM13692@candle.brasslantern.com> (raw)
In-Reply-To: <9709290629.AA08437@gamma.informatik.hu-berlin.de>
On Sep 29, 8:29am, Sven Wischnowsky wrote:
} Subject: Re: compctl -Tx 'w[0,...] ...' ...
}
} "Bart Schaefer" wrote:
} >
} > Now you may be wondering, what's the point of all this? Well, at first it
} > was just a desire to have something like compctl -T but that kicked in only
} > after everything else failed. (You can almost get this with -D, but only
} > for commands that don't already have some other completion.)
}
} Hm, using flags before a `-x' or `+' with no flags following it
} (continue with default completion) aren't enough?
I don't completely understand the question, I'm afraid.
What I want is a completion that applies to *all* commands, as do -D and
-T, but that is triggered *after* any other completion provided for any
specific command. I guess I could get the effect by altering every other
completion I ever define to end with the "continue using default" switch;
but that means keeping my own edited copies of all the examples from the
zsh dist, etc.
} Could I get an example, please?
The example I was thinking of was
compctl -Tx 'n[1,=]' -f
That says to complete file names after the first `=' in any word, for any
command. Because it's a -T, it gets used *before* something like this:
compctl -x 'C[0,conv=*,*] n[-1,,], s[conv=]' \
-k '(ascii ebcdic ibm block unblock lcase ucase swap noerror sync)' \
-q -S ',' -- dd
so then you can't complete conv= in a dd-specific way. I want 'n[1,=]' -f
to apply to every command, but *after* the specific completions are tried.
} But I admit that I didn't think of using `-T' with `w[0,...]'...
}
} > Also, if you convert all your compctls to one big -T like that, then you
} > can replace 'w[0,string]' with 'W[0,pattern]' and get an effect that a few
} > persistent zsh-users have been requesting for some years: pattern matching
} > on the command name when defining a completion.
} >
}
} Huh? That wouldn't be that difficult to implement (I think) and I
} don't remember a request for it...
I'm pretty sure I requested it myself ... an example would be to set up a
compctl so that every command matching `x*' would accept the standard X
toolkit completions (-display, -xrm, etc.). The reason it might be hard
is because you could end up with multiple different compctl lines that
match the same command:
compctl -k '(-display -geometry -xrm)' x*
compctl -k hosts xhosts
How would the ambiguity be resolved?
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
next prev parent reply other threads:[~1997-09-30 5:06 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
1997-09-29 6:29 Sven Wischnowsky
1997-09-30 4:57 ` Bart Schaefer [this message]
1997-09-30 6:44 Sven Wischnowsky
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=970929215720.ZM13692@candle.brasslantern.com \
--to=schaefer@brasslantern.com \
--cc=wischnow@informatik.hu-berlin.de \
--cc=zsh-workers@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).