zsh-users
 help / color / mirror / code / Atom feed
* Call for opinions on a couple of prospective zsh patches
@ 1999-06-06  6:51 Bart Schaefer
  1999-06-06 13:36 ` Adam Spiers
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Bart Schaefer @ 1999-06-06  6:51 UTC (permalink / raw)
  To: zsh-users

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 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.

  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.  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.

* 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.

* 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.

Please agree/disagree/comment to help me make a decision on these.  Thanks.

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com


^ permalink raw reply	[flat|nested] 14+ messages in thread
* Re: WORDCHARS, etc.
@ 1999-06-10 10:42 Sven Wischnowsky
  0 siblings, 0 replies; 14+ messages in thread
From: Sven Wischnowsky @ 1999-06-10 10:42 UTC (permalink / raw)
  To: zsh-users


Peter Stephenson wrote:

> I've had this sort of worry, too.  Maybe there's room for defining new
> flags for commands, telling it (say) whether to use space-separated words
> instead of WORDCHARS-defined words, which might be handled by some sleight
> of hand in the macro used in zle_word, i.e. instead of testing iword() we
> test !inblank() (we're approaching the limits of type flags possible with a
> short if we need more).  The syntax might be that you defined a new widget
> using `zle', but in a way that made it use an existing builtin function
> just with those extra flags.  That would reduce the hassle to one zle and
> one bindkey command.  I think this could even be done quite easily with zle
> -A, where you allowed the thingy to store ZLE_* flags and used the
> appropriate part of the set to override the ones in the widget (non-zle
> hackers are not expected to understand that sentence).

The more I read about this the more I think that we should just go
ahead and allow all zle widget functions to get (an arbitrary number
of) arguments (strings). If no arguments are given, the function uses
its defaults. We could than probably have a couple of generic
functions (e.g. for word movement) and define aliases to them with
fixed arguments (as Peter suggested with flags), probably even for
some of the functions that are currently real builtin widgets.

I mean, we were talking about allowing arguments for the search-
functions anyway, so why not use it it many more places.


Bye
 Sven


--
Sven Wischnowsky                         wischnow@informatik.hu-berlin.de


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~1999-06-10 10:43 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-06-06  6:51 Call for opinions on a couple of prospective zsh patches Bart Schaefer
1999-06-06 13:36 ` Adam Spiers
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
1999-06-10 10:42 WORDCHARS, etc Sven Wischnowsky

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).