zsh-workers
 help / color / mirror / code / Atom feed
* Re: Miscellaneous buglettes
@ 1999-09-06  9:55 Sven Wischnowsky
  0 siblings, 0 replies; 7+ messages in thread
From: Sven Wischnowsky @ 1999-09-06  9:55 UTC (permalink / raw)
  To: zsh-workers


Adam Spiers wrote:

>   - In the Completion System/Completion Functions section of the
>     info page, the bit describing _long_options refers to -help
>     where it should refer to --help.  This is odd, because the
>     corresponding .yo file refers to --help AFAICS.  I've no idea
>     how to fix this.

Hm, just using `tt(-)tt(-help)' seems to work.

Btw, the second example for `_arguments' is messed up in the info
file, while the first one isn't. How comes that?

Bye
 Sven

diff -u od/Zsh/compsys.yo Doc/Zsh/compsys.yo
--- od/Zsh/compsys.yo	Mon Sep  6 11:54:15 1999
+++ Doc/Zsh/compsys.yo	Mon Sep  6 11:53:53 1999
@@ -924,10 +924,10 @@
 string from the line may contain more than one such option letter.
 
 The function can also be made to automatically complete long options
-for commands that support the `tt(--help)' option as, for example,
-most of the GNU commands do. For this, the string `tt(--)' must be
+for commands that support the `tt(-)tt(-help)' option as, for example,
+most of the GNU commands do. For this, the string `tt(-)tt(-)' must be
 given as one argument and if it is, the command from the line is
-invoked with the `tt(--help)' option and its output is parsed to find
+invoked with the `tt(-)tt(-help)' option and its output is parsed to find
 possible option names. Note that this means that you should be careful
 to make sure that this feature is not used for a command that does not
 support this option.
@@ -935,13 +935,13 @@
 For options that get an argument after a `tt(=)', the function also tries
 to automatically find out what should be completed as the argument.
 The possible completions for option-arguments can be described with
-the arguments after the `tt(--)' (which are not used as described
+the arguments after the `tt(-)tt(-)' (which are not used as described
 above). Each argument contains one description of the form
 `var(pattern)tt(:)var(message)tt(:)var(action)'. The var(message) and
 the var(action) have the same format as for the normal option
 descriptions described above. The var(action) will be executed to
 complete arguments of options whose description in the output of the
-command from the line with the `tt(--help)' option matches the
+command from the line with the `tt(-)tt(-help)' option matches the
 var(pattern). For example:
 
 example(_arguments -- '*\*'     '(yes no)' \ 
@@ -963,17 +963,17 @@
 it about this as described for the normal option descriptions above.
 
 The option `tt(-i) var(patterns)' (which must be given after the
-`tt(--)') can be used to give patterns for options which should not be
+`tt(-)tt(-)') can be used to give patterns for options which should not be
 completed. The patterns can be given as the name of an array parameter
 or as a literal list in parentheses. E.g. `tt(-i
-"(--(en|dis)able-FEATURE*)")' will make the options
-`tt(--enable-FEATURE)' and `tt(--disable-FEATURE)' be ignored. The
-option `tt(-s) var(pairs)' (again, after the `tt(--)') can be used to
+"LPAR()-)tt(-(en|dis)able-FEATURE*RPAR()")' will make the options
+`tt(-)tt(-enable-FEATURE)' and `tt(-)tt(-disable-FEATURE)' be ignored. The
+option `tt(-s) var(pairs)' (again, after the `tt(-)tt(-)') can be used to
 describe option aliases. Each var(pair) consists of a pattern and a
 replacement. E.g. some tt(configure)-scripts describe options only as
-`tt(--enable-foo)', but also accept `tt(disable-foo)'. To allow
-completion of the second form, one would use `tt(-s "(#--enable-
---disable-)")'.
+`tt(-)tt(-enable-foo)', but also accept `tt(disable-foo)'. To allow
+completion of the second form, one would use `tt(-s "LPAR()#-)tt(-enable-
+-)tt(-disable-RPAR()")'.
 
 Finally, this function uses one configuration key: tt(option_prefix). If
 this is set to a string containing `tt(short)' or `tt(all)' as a

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


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

* Re: Miscellaneous buglettes
  1999-09-05 21:45 Adam Spiers
  1999-09-06  9:01 ` Peter Stephenson
@ 1999-09-06 18:55 ` Tanaka Akira
  1 sibling, 0 replies; 7+ messages in thread
From: Tanaka Akira @ 1999-09-06 18:55 UTC (permalink / raw)
  To: zsh workers mailing list

In article <19990905224540.A7557@thelonious.new.ox.ac.uk>,
  Adam Spiers <adam@thelonious.new.ox.ac.uk> writes:

> I've been building a list of bugs (I think) I've discovered with
> 3.1.6.  Ideally I would like to have checked they haven't already been
> fixed before reporting them, but you guys work so damn fast that I
> can't keep up with all your patches.  I don't think I've seen any of
> these mentioned recently, but to this end if someone gets around to
> providing anonymous CVS, I'd be enormously grateful.  In the meantime,
> realistically the best I can manage is patches to pws-2.

Personally, I'm tracking latest zsh by cvs. And it can be accessed by
anonymous cvs.

Try `:pserver:anonymous@crane.jaist.ac.jp:/projects/zsh'.
The password is empty string and module name is `zsh'.

The main trunc should be latest zsh.

P.S.

Please keep the following description of zsh-development-guide:

  Please make sure the filenames in the diff header
  are relative to the top-level directory of the zsh distribution; for
  example, it should say "Src/init.c" rather than "init.c" or
  "zsh/Src/init.c".

Your diff headers like

  --- zsh-3.1.6-4/Doc/Zsh/compsys.yo      Mon Sep  6 13:15:29 1999
  +++ zsh-3.1.6-adam/Doc/Zsh/compsys.yo   Mon Sep  6 14:14:31 1999

confuse my script to apply patches semi-automatically.
(In this case, `patch -p0' cannot find `compsys.yo'.)
-- 
Tanaka Akira


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

* Re: Miscellaneous buglettes
  1999-09-06  9:01 ` Peter Stephenson
@ 1999-09-06 10:27   ` Adam Spiers
  0 siblings, 0 replies; 7+ messages in thread
From: Adam Spiers @ 1999-09-06 10:27 UTC (permalink / raw)
  To: Zsh hackers list

I wrote:

> - _history_complete_word only works on recent history, not saved
>    history AFAICS.  This is a problem specifically with compgen -H, I
>    presume.

Apologies; I was talking rubbish, as I'm sure you guessed.  I'd
forgotten that the completions get sorted first.


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

* Re: Miscellaneous buglettes
@ 1999-09-06  9:39 Sven Wischnowsky
  0 siblings, 0 replies; 7+ messages in thread
From: Sven Wischnowsky @ 1999-09-06  9:39 UTC (permalink / raw)
  To: zsh-workers


Adam Spiers wrote:

>   - Try ls \ <enter>, then press C-d repeatedly.

Oops. But it was easier to fix than I first thought.

Bye
 Sven

diff -u os/Zle/zle_tricky.c Src/Zle/zle_tricky.c
--- os/Zle/zle_tricky.c	Mon Sep  6 11:34:59 1999
+++ Src/Zle/zle_tricky.c	Mon Sep  6 11:37:58 1999
@@ -874,6 +874,8 @@
     metafy_line();
 
     ocs = cs;
+    origline = dupstring((char *) line);
+    origcs = cs;
     if (!isfirstln && chline != NULL) {
 	/* If we are completing in a multi-line buffer (which was not  *
 	 * taken from the history), we have to prepend the stuff saved *
@@ -897,8 +899,6 @@
     autoq = '\0';
     /* Get the word to complete. */
     noerrs = 1;
-    origline = dupstring((char *) line);
-    origcs = cs;
     s = get_comp_string();
     DPUTS(wb < 0 || cs < wb || cs > we,
 	  "BUG: 0 <= wb <= cs <= we is not true!");

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


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

* Re: Miscellaneous buglettes
@ 1999-09-06  9:34 Sven Wischnowsky
  0 siblings, 0 replies; 7+ messages in thread
From: Sven Wischnowsky @ 1999-09-06  9:34 UTC (permalink / raw)
  To: zsh-workers


Adam Spiers wrote:

>   - zle -R foo from the command line prints garbage.

It shouldn't be possible to call it outside widget functions.

Bye
 Sven

diff -u os/Zle/zle_thingy.c Src/Zle/zle_thingy.c
--- os/Zle/zle_thingy.c	Thu Sep  2 11:39:18 1999
+++ Src/Zle/zle_thingy.c	Mon Sep  6 11:32:52 1999
@@ -399,6 +399,10 @@
     char *s = statusline;
     int sl = statusll, ocl = clearlist;
 
+    if (!zleactive) {
+	zerrnam(name, "can only be called from widget function", NULL, 0);
+	return 1;
+    }
     statusline = NULL;
     statusll = 0;
     if (*args) {
@@ -435,6 +439,10 @@
 {
     char *p = *args;
 
+    if (!zleactive) {
+	zerrnam(name, "can only be called from widget function", NULL, 0);
+	return 1;
+    }
     while (*p)
 	ungetkey((int) *p++);
     return 0;

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


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

* Re: Miscellaneous buglettes
  1999-09-05 21:45 Adam Spiers
@ 1999-09-06  9:01 ` Peter Stephenson
  1999-09-06 10:27   ` Adam Spiers
  1999-09-06 18:55 ` Tanaka Akira
  1 sibling, 1 reply; 7+ messages in thread
From: Peter Stephenson @ 1999-09-06  9:01 UTC (permalink / raw)
  To: Zsh hackers list

Adam Spiers wrote:
>   - HIST_FIND_NO_DUPS option not documented (or NEWS is wrong, one of
>     the two)

It does seem to work, the patch is below, if I've worked out what it
does properly.

>   - Minor bugs in the info pages (fixed by patch below).  For future
>     reference, is it necessary to include patches to zsh.texi when
>     patch *.yo?

Somebody seems to have got to these already, as far as I can see.
Only the yodl files need patching, the .texi file is generated from
that.

--- Doc/Zsh/options.yo.hist	Mon Sep  6 09:52:52 1999
+++ Doc/Zsh/options.yo	Mon Sep  6 10:20:56 1999
@@ -452,6 +452,13 @@
 events, otherwise this option will behave just like
 tt(HIST_IGNORE_ALL_DUPS) once the history fills up with unique events.
 )
+pindex(HIST_FIND_NO_DUPS)
+cindex(history, ignoring duplicates in search)
+item(tt(HIST_FIND_NO_DUPS))(
+When searching for history entries in the line editor, do not display
+duplicates of a line previously found, even if the duplicates are not
+contiguous.
+)
 pindex(HIST_IGNORE_ALL_DUPS)
 cindex(history, ignoring all duplicates)
 item(tt(HIST_IGNORE_ALL_DUPS))(

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


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

* Miscellaneous buglettes
@ 1999-09-05 21:45 Adam Spiers
  1999-09-06  9:01 ` Peter Stephenson
  1999-09-06 18:55 ` Tanaka Akira
  0 siblings, 2 replies; 7+ messages in thread
From: Adam Spiers @ 1999-09-05 21:45 UTC (permalink / raw)
  To: zsh workers mailing list

I've been building a list of bugs (I think) I've discovered with
3.1.6.  Ideally I would like to have checked they haven't already been
fixed before reporting them, but you guys work so damn fast that I
can't keep up with all your patches.  I don't think I've seen any of
these mentioned recently, but to this end if someone gets around to
providing anonymous CVS, I'd be enormously grateful.  In the meantime,
realistically the best I can manage is patches to pws-2.

  - HIST_FIND_NO_DUPS option not documented (or NEWS is wrong, one of
    the two)

  - Minor bugs in the info pages (fixed by patch below).  For future
    reference, is it necessary to include patches to zsh.texi when
    patch *.yo?

  - Try ls \ <enter>, then press C-d repeatedly.

  - In the Completion System/Completion Functions section of the
    info page, the bit describing _long_options refers to -help
    where it should refer to --help.  This is odd, because the
    corresponding .yo file refers to --help AFAICS.  I've no idea
    how to fix this.

  - zle -R foo from the command line prints garbage.

  - _history_complete_word only works on recent history, not saved
    history AFAICS.  This is a problem specifically with compgen -H, I
    presume.

Hope this is of use, and I hope you don't wince too much at the
newbie-ness which must be self-evident in this post :-)

By the way, I took a .spec file from an old 3.1.5 source rpm floating
around, and cleaned it up and got it working with 3.1.6-pws-2.  It
takes advantage of that new DESTDIR patch too.  If anyone would like
to see it, let me know.

Adam

--- ./Doc/Zsh/options.yo.orig	Sun Sep  5 20:33:15 1999
+++ ./Doc/Zsh/options.yo	Sun Sep  5 20:33:21 1999
@@ -480,15 +480,15 @@
 Remove the tt(history) (tt(fc -l)) command from
 the history when invoked.
 )
-pindex(HIST_SAVE_NO_DUPS)
-item(tt(HIST_SAVE_NO_DUPS))(
-When writing out the history file, older commands that duplicate
-newer ones are omitted.
-)
 pindex(HIST_REDUCE_BLANKS)
 item(tt(HIST_REDUCE_BLANKS))(
 Remove superfluous blanks from each command line
 being added to the history list.
+)
+pindex(HIST_SAVE_NO_DUPS)
+item(tt(HIST_SAVE_NO_DUPS))(
+When writing out the history file, older commands that duplicate
+newer ones are omitted.
 )
 pindex(HIST_VERIFY)
 cindex(history, verifying substitution)
--- ./Doc/Zsh/params.yo.orig	Sun Sep  5 20:37:06 1999
+++ ./Doc/Zsh/params.yo	Sun Sep  5 20:37:11 1999
@@ -146,7 +146,7 @@
 key found is used.
 )
 item(tt(I))(
-like `tt(i), but gives the index of the last match, or all possible
+like `tt(i)', but gives the index of the last match, or all possible
 matching keys in an associative array.
 )
 item(tt(n:)var(expr)tt(:))(
--- ./Doc/zsh.texi.orig	Tue Aug 31 01:57:30 1999
+++ ./Doc/zsh.texi	Sun Sep  5 20:34:59 1999
@@ -4164,7 +4164,7 @@
 key found is used.
 
 @item @t{I}
-like `@t{i}, but gives the index of the last match, or all possible
+like `@t{i}', but gives the index of the last match, or all possible
 matching keys in an associative array.
 
 @item @t{n:}@var{expr}@t{:}
@@ -5450,15 +5450,15 @@
 Remove the @t{history} (@t{fc -l}) command from
 the history when invoked.
 
-@pindex HIST_SAVE_NO_DUPS
-@item @t{HIST_SAVE_NO_DUPS}
-When writing out the history file, older commands that duplicate
-newer ones are omitted.
-
 @pindex HIST_REDUCE_BLANKS
 @item @t{HIST_REDUCE_BLANKS}
 Remove superfluous blanks from each command line
 being added to the history list.
+
+@pindex HIST_SAVE_NO_DUPS
+@item @t{HIST_SAVE_NO_DUPS}
+When writing out the history file, older commands that duplicate
+newer ones are omitted.
 
 @pindex HIST_VERIFY
 @cindex history, verifying substitution


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

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

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-09-06  9:55 Miscellaneous buglettes Sven Wischnowsky
  -- strict thread matches above, loose matches on Subject: below --
1999-09-06  9:39 Sven Wischnowsky
1999-09-06  9:34 Sven Wischnowsky
1999-09-05 21:45 Adam Spiers
1999-09-06  9:01 ` Peter Stephenson
1999-09-06 10:27   ` Adam Spiers
1999-09-06 18:55 ` Tanaka Akira

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