zsh-workers
 help / color / mirror / code / Atom feed
* pws-22
@ 1999-06-15  9:15 Peter Stephenson
  1999-06-15 10:10 ` pws-22 Helmut Jarausch
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Peter Stephenson @ 1999-06-15  9:15 UTC (permalink / raw)
  To: Zsh hackers list

http://www.ifh.de/~pws/computing/
-rw-r--r--  1 pws  quadrics  276167 Jun 15 10:56 zsh-3.1.5-pws-22.doc.tar.bz2
-rw-r--r--  1 pws  quadrics  413518 Jun 15 11:23 zsh-3.1.5-pws-22.doc.tar.gz
-rw-r--r--  1 pws  quadrics  772983 Jun 15 10:56 zsh-3.1.5-pws-22.tar.bz2
-rw-r--r--  1 pws  quadrics  956274 Jun 15 11:24 zsh-3.1.5-pws-22.tar.gz

There have been so many changes since last time that I feel confident that
there cannot possible be any bugs left at all.  Everything works perfectly
and if you see something that doesn't it's probably just a figment.  I've
tried --enable-lfs and --enable-zsh-mem on three systems, two with gcc one
without, and it seems to work.

The stuff for argument handling of zle widgets still has to go in;
installation and startup of new completion still has to be finalised; I
still have to write fancier handling for checking whether to install
functions, maybe; we probably have to change $NUMERIC in zle widgets so
that it's not set if there is no prefix.

I presume no-one was using the .doc.tar files, since some of the info files
were missing (there are now 16).


1999-06-15  Peter Stephenson  <pws@ibmth.difi.unipi.it>

	* Oliver: 6636: Completion/Builtins/_limits: wasn't working

	* Bart: 6617 + minor changes: Src/utils.c: Be more careful keeping
	  $COLUMNS and $LINES correct, particularly if exported.

	* Sven: zsh-users/2388: Src/jobs.c:  while loops etc. in shells
	  running without MONITOR were hard to kill.

	* Bart: 6628: Src/params.c: setting slices of unset array
	  caused a crash.

1999-06-14  Peter Stephenson  <pws@ibmth.difi.unipi.it>

	* pws: 6626: Src/mem.c: in zsh's malloc, try to make sure when
	  sbrk'ing that it's sufficiently well aligned.

	* Oliver: 6624: Completion/Builtins/_kill,
	  Completion/Builtins/_wait: more widely functioning process
	  handling

	* pws: 6623: Completion/Makefile.in, Config/defs.mk.in,
	  Functions/Makefile.in, INSTALL, Src/init.c, Src/zsh.mdd,
	  configure.in: --enable-function-subdirs allows installation
	  into subdirectories of the function directory and sets the
	  initial $fpath appropriately.

	* Oliver: 6620: Completion/Builtins/_jobs: handle disown, too.

	* pws: 6618: Doc/Zsh/func.yo, Doc/Zsh/grammar.yo, Src/lex.c:
	  with SH_GLOB set, function definition parentheses after the
	  first word on the line allow spaces inside.

	* Sven: 6614: Src/Zle/zle_tricky.c, Completion/Brace/_brace_parameter:
	  completion after quotes in parameters
	
	* pws: 6610: Src/glob.c: globbing flags shouldn't be active
	  without extendedglob.

	* Bart: 6608: Doc/Zsh files compctl.yo, compsys.yo, compwid.yo,
	  expn.yo, files.yo, mod_mapfile.yo, mod_zftp.yo, params.yo,
	  zftpsys.yo, zle.yo: spelling corrections

1999-06-12  Peter Stephenson  <pws@ibmth.difi.unipi.it>

	* pws: 6601: Src/Makefile.in: don't remake Makemod just
	  to clean up files

	* pws: 6600: Doc/Zsh/arith.yo, Doc/Zsh/compctl.yo,
	  Doc/Zsh/compsys.yo, Doc/Zsh/compwid.yo, Doc/Zsh/expn.yo,
	  Doc/Zsh/guide.yo, Doc/Zsh/jobs.yo, Doc/Zsh/metafaq.yo,
	  Doc/Zsh/mod_compctl.yo, Doc/Zsh/mod_zftp.yo, Doc/Zsh/params.yo,
	  Doc/Zsh/redirect.yo, Doc/Zsh/zftpsys.yo, Doc/Zsh/zle.yo,
	  Doc/zman.yo, Doc/ztexi.yo, Util/zsh-development-guide:
	  Formatting of unfilled text now handled by three distinct
	  macros example(), indent(), nofill(); compctl description node
	  is now called `Programmable Completion Using compctl' to
	  distinguish it from widget completion; don't put chapters on
	  separate pages because many are too short.

	* Wayne: 6599: Src/Zle/zle_tricky.c: unitialised variable warnings
	  from gcc

1999-06-11  Peter Stephenson  <pws@ibmth.difi.unipi.it>

	* pws: 6598: Doc/Zsh/zftpsys.yo, Functions/Zftp/zfinit,
	  Functions/Zftp/zfgoto, Functions/Zftp/zfmark,
	  Functions/Zftp/zftp_chpwd, Completion/Builtins/_zftp:
	  add zfmark and zfgoto implementing bookmarks (including use
	  ncftp bookmarks) for zftp function suite; autoload functions
	  from zfinit; patcomps -> _patcomps.

	* pws: 6596: Doc/Zsh/arith.yo: update on size of integers and
	  increase in clarity of presentation

	* Sven: 6589: Completion/Core/_path_files: use :h and :t instead
	  of pattern matching

	* Sven: 6587, 6588: Src/Zle/zle_misc.c, Doc/Zsh/options.yo: < and
	  > shouldn't remove a suffix, but | does

	* Sven: 6586: Src/exec.c, Src/lex.c, Src/loop.c: don't modify
	  struct cmd to insert cmd args and flags, always pass those
	  separately

1999-06-10  Peter Stephenson  <pws@ibmth.difi.unipi.it>

	* Andrej: 6581: Doc/Makefile: dependencies for manuals

	* Sven: 6579: Src/exec.c: old hack of storing shell function
	  args in struct cmd doesn't work any more

	* Sven: 6577: Src/exec.c, Src/text.c, Src/utils.c: expunge
	  simplifyright(), which appears no longer to have an effect
	
	* pws: 6575: Doc/Zsh/mod_mapfile.yo: avoid mapping long files

	* pws: 6571: Src/Builtins/rlimits.c: use appropriate printf()
	  routine in printulimit() instead of just casting to long

	* pws: 6570: configure.in, INSTALL: some systems have
	  sizeof(off_t) or sizeof(ino_t) == 8 and sizeof(long) == 4 even
	  without explicit enabling, so check and if so use the
	  --enable-lfs code.

	* pws/Sven: 6567, 6568: Completion/Base/_vars: complete assoc
	  array keys

	* pws: 6566: Src/params.c: junk testhash assoc array

	* pws: 6563: sporadic: minor changes affecting casts, sizes
	  of integers, unused variables; add index for subscripts in
	  manual

	* Bart: email: Src/zsh.h: alternative definition for zulong

	* Bart: 6558: Src/builtins.c: printing functions with the
	  UNALIASED flag

	* Sven: 6557: Doc/zsh/compsys.yo: a few typos

1999-06-09  Peter Stephenson  <pws@ibmth.difi.unipi.it>

	* Andrej: 6556: aczsh.m4: don't disable setting variables
	  for --enable-lfs just because some other variables were set

	* Sven: 6554: Src/Zle/zle_tricky.c: display bugs with compadd -X:
	  newline missing and display unnecessarily altered

	* pws: 6552: configure.in, aczsh.m4, acconfig.h, Src/zsh.h:
	  define separate unsigned 64-bit integer; try __int64_t and
	  __uint64_t.

	* Sven: 6548: Src/Zle/zle_tricky.c: fix `compctl -l'

	* Andrej: 6544: configure displays info on function installation

	* Sven: 6542: Src/builtin.c, Src/exec.c, Src/hist.c, Src/init.c,
	  Src/lex.c: when not using interactive history, don't allocate
	  history at all

	* Andrej: 6541: configure.in: add missing `test'

	* Sven: 6535: Completion/core/_normal: an eval was unnecessary

	* Bart: 6534: Completion/Core/compdump, Completion/Core/compinit,
	  Doc/Zsh/builtins.yo, Src/builtin.c, Src/exec.c, Src/zsh.h:
	  autoload -U defines functions which don't use expand aliases
	  during loading; used in new completion code to protect
	  functions.

	* Sven: 6527: Src/builtin.c, Src/cond.c, Src/exec.c, Src/glob.c,
	  Src/hashtable.c, Src/init.c, Src/jobs.c, Src/lex.c,
	  Src/linklist.c, Src/loop.c, Src/math.c, Src/mem.c, Src/params.c,
	  Src/parse.c, Src/signals.c, Src/text.c, Src/utils.c, Src/zsh.h:
	  various sets of patches:
	  - make zhalloc() use a pointer to the first free heap
	  - make zsh-mem allocators keep some memory back when freeing
	  - reduce the amount of allocation work done in the exec.c
	    execution hierarchy
	  - don't duplicate execution trees any more than necessary, e.g.
	    execute functions from stored tree
	
	* pws: Etc/MACHINES: Danek Duvall reports --enable-dynamic OK
	  on Solaris 2.7, despite previous reports; Sven says on Digital
	  UNIX 4.0, you need special DLLD and LDFLAGS.

1999-06-08  Peter Stephenson  <pws@ibmth.difi.unipi.it>

	* pws: 6525: Src/lex.c (gettokstr): allow parentheses after
	  first character in command word

	* Tanaka Akira: 6522: configure.in: help string for --enable-fndir
	  had wrong default directory

	* pws: 6520: configure.in: --enable-fndir might be yes,
	  so turn it into ${datadir}/zsh/functions

-- 
Peter Stephenson <pws@ibmth.df.unipi.it>       Tel: +39 050 844536
WWW:  http://www.ifh.de/~pws/
Dipartimento di Fisica, Via Buonarroti 2, 56127 Pisa, Italy


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

* Re: pws-22
  1999-06-15  9:15 pws-22 Peter Stephenson
@ 1999-06-15 10:10 ` Helmut Jarausch
  1999-06-15 15:23 ` New completion - redefine widgets instead of rebinding keys pws-22 Andrej Borsenkow
  1999-06-15 15:40 ` Modules and function install " Andrej Borsenkow
  2 siblings, 0 replies; 7+ messages in thread
From: Helmut Jarausch @ 1999-06-15 10:10 UTC (permalink / raw)
  To: zsh-workers

MANY MANY thanks to all who help improving ZSH

especially to  Peter and Sven !



--
Helmut Jarausch
Lehrstuhl fuer Numerische Mathematik
Institute of Technology, RWTH Aachen
D 52056 Aachen, Germany




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

* New completion - redefine widgets instead of rebinding keys RE: pws-22
  1999-06-15  9:15 pws-22 Peter Stephenson
  1999-06-15 10:10 ` pws-22 Helmut Jarausch
@ 1999-06-15 15:23 ` Andrej Borsenkow
  1999-06-16 15:42   ` Peter Stephenson
  1999-06-15 15:40 ` Modules and function install " Andrej Borsenkow
  2 siblings, 1 reply; 7+ messages in thread
From: Andrej Borsenkow @ 1999-06-15 15:23 UTC (permalink / raw)
  To: Peter Stephenson, Zsh hackers list

>
> The stuff for argument handling of zle widgets still has to go in;
> installation and startup of new completion still has to be finalised; I
> still have to write fancier handling for checking whether to install
> functions, maybe; we probably have to change $NUMERIC in zle widgets so
> that it's not set if there is no prefix.
>

Since I've never seen any reply to this, I repeat it here.

My suggestion was, that instead of rebinding keys (as is done currently) we
should simply redefine corresponding widgets. IMHO this has some advantage as

 - makes startup files less error prone. I bet, that every now and then some
user will change completion widget binding after intializing new completion and
then wonder, why does not work. Less noice on zsh-users :-)

 - is keymap independent. I remember some discussions of switching keymaps
on-the-fly. If this will ever be implemented, current way of rebinding single
keymap won't do. Even now you may find itself suddenly starting in Vi istead of
Emacs mode - and wondering, why completion behaves strange.

It makes also compinit more simple. Instead of filtering bindkey output you
simply redefine (always the same) widgets.

Original widgets are always available so it is quite safe.

any comments?

/andrej


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

* Modules and function install RE: pws-22
  1999-06-15  9:15 pws-22 Peter Stephenson
  1999-06-15 10:10 ` pws-22 Helmut Jarausch
  1999-06-15 15:23 ` New completion - redefine widgets instead of rebinding keys pws-22 Andrej Borsenkow
@ 1999-06-15 15:40 ` Andrej Borsenkow
  2 siblings, 0 replies; 7+ messages in thread
From: Andrej Borsenkow @ 1999-06-15 15:40 UTC (permalink / raw)
  To: Peter Stephenson, Zsh hackers list

It looks, like more elaborate function install scheme is needed. I just
installed pws-22 on a system that has problems with modules. So, I included most
modules (incl. zftp) in xmods.conf, configured, built - and 'course, Zftp/* was
not installed.

You may say, I had to include it manually - may be. But note, that

 - Most end users are not expected to know, what module needs which functions.
 - what's worse, I must define the whole list - again, how do I know it (that
was mainly the reason I suggested INCLUDE/EXCLUDE options). I hope, more modules
will be born ... with more functions (hopefully) ... and you cannot be sure,
everything is listed in INSTALL. In any case, at some time it will be tedious
(at least).

What we now have starts to look more and more like a package (in Perl's sense) -
a bit of software, consisting of binary and/or shell code. One example is new
completion - another one is zftp. So, ideally, installation should be handled
automatically - if this package is included (either as module or as compiled
in), corresponding functions should be installed as well. And I can well imagine
a package, consisting only of shell code.

Is it sensible?

/andrej


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

* Re: New completion - redefine widgets instead of rebinding keys RE: pws-22
  1999-06-15 15:23 ` New completion - redefine widgets instead of rebinding keys pws-22 Andrej Borsenkow
@ 1999-06-16 15:42   ` Peter Stephenson
  1999-06-16 16:14     ` PATCH: pws-22: zle -C after rebinding completion widgets Peter Stephenson
  1999-06-18 14:55     ` New completion - redefine widgets instead of rebinding keys RE: pws-22 Peter Stephenson
  0 siblings, 2 replies; 7+ messages in thread
From: Peter Stephenson @ 1999-06-16 15:42 UTC (permalink / raw)
  To: Peter Stephenson, Zsh hackers list

"Andrej Borsenkow" wrote:
> Since I've never seen any reply to this, I repeat it here.
> 
> My suggestion was, that instead of rebinding keys (as is done currently) we
> should simply redefine corresponding widgets.

This certainly looks like a good idea.  I think the reason it hasn't been
done is the same as usual:  the functions were written when the system was
still for hackers rather than users.  But certainly most users are going to
switch over completely, if at all, to the new system, and having the old
ones bound is unnecessary and confusing.  Unless I'm missing something.
I'll try it here first: the compinit code should be simpler than before.

Maybe we should mention the .immortal widgets in the zshcompsys manual
entry.

By the way, is there a way of getting a list of all widgets (including
builtin ones), apart from the -b option to compctl/compgen?  If not,
shouldn't there be?  E.g. zle -L[l]b ?

-- 
Peter Stephenson <pws@ibmth.df.unipi.it>       Tel: +39 050 844536
WWW:  http://www.ifh.de/~pws/
Dipartimento di Fisica, Via Buonarroti 2, 56127 Pisa, Italy


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

* PATCH: pws-22: zle -C after rebinding completion widgets
  1999-06-16 15:42   ` Peter Stephenson
@ 1999-06-16 16:14     ` Peter Stephenson
  1999-06-18 14:55     ` New completion - redefine widgets instead of rebinding keys RE: pws-22 Peter Stephenson
  1 sibling, 0 replies; 7+ messages in thread
From: Peter Stephenson @ 1999-06-16 16:14 UTC (permalink / raw)
  To: Zsh hackers list

Peter Stephenson wrote:
> "Andrej Borsenkow" wrote:
> > Since I've never seen any reply to this, I repeat it here.
> > 
> > My suggestion was, that instead of rebinding keys (as is done currently) we
> > should simply redefine corresponding widgets.
> 
> This certainly looks like a good idea.

One tweak might be nice first: if a completion widget, for example
complete-word, is rebound, then `zle -C ... complete-word ...' doesn't
work; you need .complete-word.  There's no reason in this case why we
shouldn't use the immortal version with the `.' in front all the time,
since the intention is unambiguous.

--- Doc/Zsh/compwid.yo.dot	Mon Jun 14 09:12:38 1999
+++ Doc/Zsh/compwid.yo	Wed Jun 16 18:07:45 1999
@@ -26,7 +26,8 @@
 tt(complete-word), tt(expand-or-complete),
 tt(expand-or-complete-prefix), tt(menu-complete),
 tt(menu-expand-or-complete), tt(reverse-menu-complete),
-tt(list-choices), or tt(delete-char-or-list).
+tt(list-choices), or tt(delete-char-or-list).  Note that this will still
+work even if the widget in question has been rebound.
 
 startmenu()
 menu(Special Parameters)
--- Src/Zle/zle_thingy.c.dot	Mon Jun 14 16:46:53 1999
+++ Src/Zle/zle_thingy.c	Wed Jun 16 18:06:12 1999
@@ -490,7 +490,8 @@
 	return 1;
     }
 #endif
-    t = rthingy(args[1]);
+    
+    t = rthingy((args[1][0] == '.') ? args[1] : dyncat(".", args[1]));
     cw = t->widget;
     unrefthingy(t);
     if (!cw || !(cw->flags & ZLE_ISCOMP)) {

-- 
Peter Stephenson <pws@ibmth.df.unipi.it>       Tel: +39 050 844536
WWW:  http://www.ifh.de/~pws/
Dipartimento di Fisica, Via Buonarroti 2, 56127 Pisa, Italy


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

* Re: New completion - redefine widgets instead of rebinding keys RE: pws-22
  1999-06-16 15:42   ` Peter Stephenson
  1999-06-16 16:14     ` PATCH: pws-22: zle -C after rebinding completion widgets Peter Stephenson
@ 1999-06-18 14:55     ` Peter Stephenson
  1 sibling, 0 replies; 7+ messages in thread
From: Peter Stephenson @ 1999-06-18 14:55 UTC (permalink / raw)
  To: Zsh hackers list

Peter Stephenson wrote:
> "Andrej Borsenkow" wrote:
> > Since I've never seen any reply to this, I repeat it here.
> > 
> > My suggestion was, that instead of rebinding keys (as is done currently) we
> > should simply redefine corresponding widgets.
> 
> This certainly looks like a good idea.

I haven't had a problem with this, so here's the diff.  compdef uses the
`.' form of the completion widgets, though after the patch I sent that's no
longer necessary.  Now binding completion keys before or after compinit and
in any keymap will work transparently.

--- Completion/Core/compinit	Wed Jun  9 09:28:57 1999
+++ /home/user2/pws/bin/comp/compinit	Wed Jun 16 18:02:06 1999
@@ -215,7 +215,11 @@
       fi
 
       # Define the widget.
-      zle -C "$func" "$1" "$func"
+      if [[ $1 = .* ]]; then
+	zle -C "$func" "$1" "$func"
+      else
+	zle -C "$func" ".$1" "$func"
+      fi
       shift
 
       # And bind the keys...
@@ -335,6 +339,14 @@
   fi
 fi
 
+
+# Rebind the standard widgets
+for _i_line in complete-word delete-char-or-list expand-or-complete \
+  expand-or-complete-prefix list-choices menu-complete \
+  menu-expand-or-complete reverse-menu-complete; do
+  zle -C $_i_line .$_i_line _main_complete
+done
+
 _i_done=''
 
 # If we have a dump file, load it.
@@ -368,23 +380,6 @@
       esac
     done
   done
-
-  bindkey |
-    while read -rA _i_line; do
-      case "$_i_line[2]" in
-      (complete-word) ;&
-      (delete-char-or-list) ;&
-      (expand-or-complete) ;&
-      (expand-or-complete-prefix) ;&
-      (list-choices) ;&
-      (menu-complete) ;&
-      (menu-expand-or-complete) ;&
-      (reverse-menu-complete)
-	zle -C _complete_$_i_line[2] $_i_line[2] _main_complete
-	bindkey "${_i_line[1][2,-2]}" _complete_$_i_line[2]
-	;;
-      esac
-    done
 
   unset _i_dir _i_line _i_file _i_tag
 
--- Completion/Core/compdump	Wed Jun  9 09:28:56 1999
+++ /home/user2/pws/bin/comp/compdump	Wed Jun 16 18:03:08 1999
@@ -44,11 +44,13 @@
 # Now dump the key bindings. We dump all bindings for zle widgets
 # whose names start with a underscore.
 # We need both the zle -C's and the bindkey's to recreate.
+# We can ignore any zle -C which rebinds a standard widget (second
+# argument to zle does not begin with a `_').
 
 _d_bks=()
 zle -lL |
   while read -rA _d_line; do
-    if [[ ${_d_line[5]} = _* ]]; then
+    if [[ ${_d_line[3]} = _* && ${_d_line[5]} = _* ]]; then
       print -r - ${_d_line}
       _d_bks=($_d_bks ${_d_line[3]})
     fi
--- Doc/Zsh/compsys.yo.bak	Thu Jun 17 14:01:38 1999
+++ Doc/Zsh/compsys.yo	Fri Jun 18 16:53:11 1999
@@ -59,6 +59,8 @@
 start and finish), you can rerun tt(compinstall) and it will correctly
 locate and modify these lines.  Note, however, that any code you add to
 this section by hand is likely to be lost if you rerun tt(compinstall).
+The new code will take effect next time you start the shell, or run
+tt(.zshrc) by hand.
 
 You can run it as `tt(source )var(<path>)tt(/compinstall)' or
 `tt(. )var(<path>)tt(/compinstall)', where var(<path>) is where the
@@ -72,6 +74,11 @@
 
 You can abort the installation any time you are being prompted for
 information, and your tt(.zshrc) will not be altered at all.
+
+After initialization all the builtin completion widgets such as
+tt(expand-or-complete) will be redefined to use the new completion system.
+Should you need to, you can still bind keys to the old functions by putting
+a `tt(.)' in front, e.g. `tt(.expand-or-complete)'.
 
 subsect(Use of compinit)
 

-- 
Peter Stephenson <pws@ibmth.df.unipi.it>       Tel: +39 050 844536
WWW:  http://www.ifh.de/~pws/
Dipartimento di Fisica, Via Buonarroti 2, 56127 Pisa, Italy


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

end of thread, other threads:[~1999-06-18 15:24 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-06-15  9:15 pws-22 Peter Stephenson
1999-06-15 10:10 ` pws-22 Helmut Jarausch
1999-06-15 15:23 ` New completion - redefine widgets instead of rebinding keys pws-22 Andrej Borsenkow
1999-06-16 15:42   ` Peter Stephenson
1999-06-16 16:14     ` PATCH: pws-22: zle -C after rebinding completion widgets Peter Stephenson
1999-06-18 14:55     ` New completion - redefine widgets instead of rebinding keys RE: pws-22 Peter Stephenson
1999-06-15 15:40 ` Modules and function install " Andrej Borsenkow

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