From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21152 invoked from network); 15 Oct 1999 06:23:51 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 15 Oct 1999 06:23:51 -0000 Received: (qmail 4814 invoked by alias); 15 Oct 1999 06:23:45 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 8266 Received: (qmail 4807 invoked from network); 15 Oct 1999 06:23:45 -0000 Date: Fri, 15 Oct 1999 08:23:43 +0200 (MET DST) Message-Id: <199910150623.IAA17032@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.auc.dk In-reply-to: Wayne Davison's message of Thu, 14 Oct 1999 20:15:57 -0700 (PDT) Subject: Re: setopt localoptions noautoremoveslash Wayne Davison wrote: > I would like an auto-added slash to be inserted into the buffer as a > special meta character (call it meta-/ for now) that has special > properties. I imagine this character displaying itself in reverse > video _only_ if it is going to be removed when I press return (it is > not removed before that unless you type a '/' right next to it). > The command-line display routine would check the character to the > right of the meta-/ to determine how to draw the character. What would you do with `-qSfoo'? I.e. you would have to allow every possible character to have an auto-removable counterpart. Also, you would have to store information about which sequences of characters have to be removed together. And then there is `compadd -r', so you would have to store information about the characters that will remove the suffix. And there is `-R', so you may have to call a function to find out if something is to be removed (and currently these functions can be sure to be called after the completion that inserted the suffix, if called only on a return, this isn't true any more). So, a complete solution would be hard (or impossible without changing the definition of the context in which remove-functions are to be called -- which is probably still possible because we haven't said that in the docs, although I think its convenient to be able to access, e.g. `_lastcomp' from within such remove-functions). That would leave the possibility to do this only for some (simple) auto-remove things but that might irritate the users if some suffixes behave this way and other behave differently. And then there is the (small) problem that the line editor can't just use, e.g. standout mode, to highlight such auto-removed things because users are free to start any terminal mode they want in `PS1' and unset it in `POSTEDIT' or whatever (the solution would obviously be to make this configurable by adding a special parameter (or two of them) whose value(s) are printed before/after such a highlighted region). Hm. Bye Sven -- Sven Wischnowsky wischnow@informatik.hu-berlin.de