zsh-users
 help / color / mirror / code / Atom feed
From: Adam Spiers <adam@thelonious.new.ox.ac.uk>
To: zsh-users@sunsite.auc.dk
Subject: Re: Call for opinions on a couple of prospective zsh patches
Date: Sun, 6 Jun 1999 14:36:05 +0100	[thread overview]
Message-ID: <19990606143605.B23915@thelonious.new.ox.ac.uk> (raw)
In-Reply-To: <990606065150.ZM9165@candle.brasslantern.com>; from Bart Schaefer on Sun, Jun 06, 1999 at 06:51:50AM +0000

Bart Schaefer (schaefer@candle.brasslantern.com) wrote:
> Greg Badros <gjb@@cs.washington.edu> has submitted patches for three new
> features that could appear in zsh 3.0.6.  I'm undecided whether to add
> any or all of them.  They are:
> 
> * Completion using "dynamic abbreviations" after the manner of the emacs
>   dabbrev package.  This includes adding a special `dabbrev-complete' ZLE
>   action, along the lines of expand-or-complete, complete-word, etc.

I submitted a patch to zsh-workers in Feb 1998 (see threads 'tcsh-like
history-based dabbrev-expand patch' and 'PATCH: complete-history')
which added history-dabbrev-expand and history-reverse-dabbrev-expand
actions, but it didn't get included because Peter had already written
a patch for zle -C, which allowed you to do something like

  zle -C complete-history -H '' 0
  bindkey "\M-/" complete-history

There were a few differences in functionality between the two (mine
had a reverse action, and with Peter's, the sequence M-/ TAB was
equivalent to M-/ M-/), but they were essentially the same thing.

Personally I find this feature so useful that I can't stand being
without it, and still use that version with my patch hacked in to this
day, which is unfortunate, because it's prevented me from regularly
trying out the newer development versions.

Which versions is zle -C (or similar) available in these days?

>   I find the effects of `dabbrev-complete' to be -very- similar to
> 	setopt menu_complete
> 	compctl -D -s '${=$(history -nr 1)}'
>   except that it can be bound to a different key than regular completion,
>   it always uses menu-completion behavior regardless of the option, and
>   the menu is sorted in reverse time order rather than alphabetically.

I really do relish it being bound to a different key.  I think I'd
prefer not to have it if it was the choice between being bound to TAB
as a fallback completion and not having it.

Also, I don't like the idea of menu-completion behaviour, because I
tend to keep a huge history (precisely for the reason that it makes a
dabbrev-expand action so useful), so I'd end up with huge menus (or a
"do you want a huge menu" prompt) most times I hit the key.  Ugh.

>   The next 3.1 release will include commands to bind special user-defined
>   completions to separate keystrokes (in the way that expand-or-complete
>   can be bound to a different key than complete-word, in 3.0) and also to
>   associate menu behavior with individual completions and to custom-sort
>   the menus; so a new builtin complete action is not likely to be added in
>   3.1.6.  I'm thus reluctant to have 3.0 branch off in a direction that
>   the development version won't follow.

Fair point.

>   And I think that most of the
>   benefits of `dabbrev-complete' can be had in plain 3.0.5 by adding the
>   above -s ... to a few compctls, so a builtin is not strictly necessary.

I'd say that if this next 3.1 release is coming soon then maybe don't
bother.  However, I would really love to see support for this
functionality ASAP.  Apart from anything else, tcsh already has it,
and we can't let tcsh have features zsh doesn't have, can we? :-)

> * Partial word motions in the face of mixed case, i.e. move the cursor to
>   the next/previous capital letter InMixedCaseWordsLikeThisOne, including
>   deletions that treat words this way.  This is also handled by adding a
>   few new ZLE builtins, and relies on isupper() to detect upper case, so
>   it may behave differently in different language locales.
> 
>   My first inclination was to think that this should be handled with the
>   WORDCHARS variable, but of course WORDCHARS adds other characters that
>   are treated as alphanumeric; there's no way to say that upper case
>   letters should -not- be treated as alphanumeric.  I guess I'd prefer a
>   patch that handled wordchar-exlusions more generically (without adding
>   builtins) and I may even look at adding such a thing.
> 
>   For this patch to go into 3.0.6, I'd want PWS to agree that the new ZLE
>   builtins would appear in 3.1.6, too.

I would like to see a lot more flexibility with the WORDCHARS stuff.
I'm constantly finding that M-f and M-b don't do what I want them to,
and I can't get them to behave how I want either.  How about the
option of an emacs-like {forward,backward}-word, which jumps to a
different place depending on which direction you're heading, for
example?

> * Support for the LS_COLORS environment string, to colorize file names in
>   the same contexts where the LIST_TYPES option presently appends various
>   markers ('/' for directories, '@' for symlinks, etc.).  Depends on the
>   terminal having color capability, obviously.
> 
>   The only issue about this one is that it's borrowed from GNU copylefted
>   source.  I don't want to include it without an exemption from the GPL,
>   and Greg doesn't want to pester the FSF about an exemption unless I'm
>   certain to include it; so we're temporarily at an impasse.  If several
>   zsh users say they'd like to see this included, I'll tell Greg to go
>   ahead and request the exemption.

I would /love/ to see this feature.  I've been missing having that in
all the shells I've used.

Adam


  reply	other threads:[~1999-06-06 13:36 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-06-06  6:51 Bart Schaefer
1999-06-06 13:36 ` Adam Spiers [this message]
1999-06-06 16:20   ` Bart Schaefer
1999-06-06 14:13 ` Peter Stephenson
1999-06-06 16:40   ` Bart Schaefer
1999-06-09 16:34   ` WORDCHARS (Re: Call for opinions on a couple of prospective zsh patches) Bart Schaefer
1999-06-10  0:51     ` Stefan Monnier
1999-06-10  8:15     ` WORDCHARS, etc Peter Stephenson
1999-06-06 16:50 ` Call for opinions on a couple of prospective zsh patches Stefan Monnier
1999-06-06 17:13   ` Adam Spiers
1999-06-06 17:25     ` Bart Schaefer
1999-06-06 18:41       ` Stefan Monnier
1999-06-07  1:22         ` Bart Schaefer

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=19990606143605.B23915@thelonious.new.ox.ac.uk \
    --to=adam@thelonious.new.ox.ac.uk \
    --cc=adam@spiers.net \
    --cc=zsh-users@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).