zsh-workers
 help / color / mirror / code / Atom feed
From: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
To: zsh-workers@sunsite.auc.dk
Subject: Re: setopt localoptions noautoremoveslash
Date: Fri, 15 Oct 1999 08:23:43 +0200 (MET DST)	[thread overview]
Message-ID: <199910150623.IAA17032@beta.informatik.hu-berlin.de> (raw)
In-Reply-To: Wayne Davison's message of Thu, 14 Oct 1999 20:15:57 -0700 (PDT)


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


             reply	other threads:[~1999-10-15  6:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-10-15  6:23 Sven Wischnowsky [this message]
  -- strict thread matches above, loose matches on Subject: below --
1999-10-14 17:09 Tanaka Akira
1999-10-14 17:15 ` Zefram
1999-10-14 18:08   ` Tanaka Akira
1999-10-15  3:15   ` Wayne Davison

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=199910150623.IAA17032@beta.informatik.hu-berlin.de \
    --to=wischnow@informatik.hu-berlin.de \
    --cc=zsh-workers@sunsite.auc.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).