* Bug + patch: `zstyle ':completion:*' menu select=long-list` fails to start menu selection @ 2021-03-04 8:56 Marlon Richert 2021-03-04 20:17 ` Daniel Shahaf 0 siblings, 1 reply; 23+ messages in thread From: Marlon Richert @ 2021-03-04 8:56 UTC (permalink / raw) To: Zsh hackers list Test case: ``` exec zsh -f LISTMAX=0 setopt menucomplete autoload -Uz compinit; compinit zstyle ':completion:*' menu select=long-list zsh -^D ``` Patch: ``` diff --git Completion/Base/Core/_main_complete Completion/Base/Core/_main_complete index 663f755..9d90b0f 100644 --- Completion/Base/Core/_main_complete +++ Completion/Base/Core/_main_complete @@ -244,7 +244,7 @@ if [[ $compstate[old_list] = keep || nm -gt 1 ]]; then _menu_style=( "$_menu_style[@]" "$_def_menu_style[@]" ) - if [[ "$compstate[list]" = *list && tmp -gt LINES && + if [[ "$compstate[list]" = *list(| *) && tmp -gt LINES && ( -n "$_menu_style[(r)select=long-list]" || -n "$_menu_style[(r)(yes|true|on|1)=long-list]" ) ]]; then compstate[insert]=menu ``` ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: Bug + patch: `zstyle ':completion:*' menu select=long-list` fails to start menu selection 2021-03-04 8:56 Bug + patch: `zstyle ':completion:*' menu select=long-list` fails to start menu selection Marlon Richert @ 2021-03-04 20:17 ` Daniel Shahaf 2021-03-04 22:26 ` Marlon Richert 2021-03-14 9:30 ` Marlon Richert 0 siblings, 2 replies; 23+ messages in thread From: Daniel Shahaf @ 2021-03-04 20:17 UTC (permalink / raw) To: Marlon Richert; +Cc: Zsh hackers list Marlon Richert wrote on Thu, Mar 04, 2021 at 10:56:06 +0200: > Test case: > ``` > exec zsh -f > LISTMAX=0 > setopt menucomplete > autoload -Uz compinit; compinit > zstyle ':completion:*' menu select=long-list > zsh -^D > ``` Thanks. Haven't reviewed the patch, but assuming it's correct, it'd be great to have this test upgraded to a proper regression test; see Test/README in the source tree. Cheers, Daniel > Patch: > ``` > diff --git Completion/Base/Core/_main_complete > Completion/Base/Core/_main_complete > index 663f755..9d90b0f 100644 > --- Completion/Base/Core/_main_complete > +++ Completion/Base/Core/_main_complete > @@ -244,7 +244,7 @@ if [[ $compstate[old_list] = keep || nm -gt 1 ]]; then > > _menu_style=( "$_menu_style[@]" "$_def_menu_style[@]" ) > > - if [[ "$compstate[list]" = *list && tmp -gt LINES && > + if [[ "$compstate[list]" = *list(| *) && tmp -gt LINES && > ( -n "$_menu_style[(r)select=long-list]" || > -n "$_menu_style[(r)(yes|true|on|1)=long-list]" ) ]]; then > compstate[insert]=menu > ``` > ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: Bug + patch: `zstyle ':completion:*' menu select=long-list` fails to start menu selection 2021-03-04 20:17 ` Daniel Shahaf @ 2021-03-04 22:26 ` Marlon Richert 2021-03-07 17:22 ` Daniel Shahaf 2021-03-14 9:30 ` Marlon Richert 1 sibling, 1 reply; 23+ messages in thread From: Marlon Richert @ 2021-03-04 22:26 UTC (permalink / raw) To: Daniel Shahaf; +Cc: Zsh hackers list On Thu, Mar 4, 2021 at 10:17 PM Daniel Shahaf <d.s@daniel.shahaf.name> wrote: > Thanks. Haven't reviewed the patch, but assuming it's correct, it'd be > great to have this test upgraded to a proper regression test; see > Test/README in the source tree. I would, but I'm unable to build Zsh from source on my Mac and thus unable to run the tests. I get this error when I try to run `make install.bin install.modules install.fns`: ``` Updated `zsh.mdh'. make[3]: *** No rule to make target `headers'. Stop. make[2]: *** [headers] Error 1 make[1]: *** [headers] Error 2 make: *** [install.bin] Error 2 ``` Also, my `config.log` file contains a bunch of fatal errors like this: ``` conftest.c:12:34: fatal error: 'foo.h' file not found #include <foo.h> ``` Help would be appreciated. ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: Bug + patch: `zstyle ':completion:*' menu select=long-list` fails to start menu selection 2021-03-04 22:26 ` Marlon Richert @ 2021-03-07 17:22 ` Daniel Shahaf 2021-03-09 17:01 ` Marlon Richert 0 siblings, 1 reply; 23+ messages in thread From: Daniel Shahaf @ 2021-03-07 17:22 UTC (permalink / raw) To: Marlon Richert; +Cc: Zsh hackers list Marlon Richert wrote on Fri, Mar 05, 2021 at 00:26:51 +0200: > On Thu, Mar 4, 2021 at 10:17 PM Daniel Shahaf <d.s@daniel.shahaf.name> wrote: > > Thanks. Haven't reviewed the patch, but assuming it's correct, it'd be > > great to have this test upgraded to a proper regression test; see > > Test/README in the source tree. > > I would, but I'm unable to build Zsh from source on my Mac and thus > unable to run the tests. I get this error when I try to run `make Thanks. > install.bin install.modules install.fns`: > ``` > Updated `zsh.mdh'. > make[3]: *** No rule to make target `headers'. Stop. > make[2]: *** [headers] Error 1 > make[1]: *** [headers] Error 2 > make: *** [install.bin] Error 2 > ``` > > Also, my `config.log` file contains a bunch of fatal errors like this: > ``` > conftest.c:12:34: fatal error: 'foo.h' file not found > #include <foo.h> > ``` > > Help would be appreciated. Does it say literally "foo" or some other thing? It's normal for configure to probe for header names that aren't installed. If building from git, did you run Util/preconfig? What was configure's exit code? Did you run `make` (the default target) first? Cheers, Daniel ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: Bug + patch: `zstyle ':completion:*' menu select=long-list` fails to start menu selection 2021-03-07 17:22 ` Daniel Shahaf @ 2021-03-09 17:01 ` Marlon Richert 2021-03-09 21:19 ` Daniel Shahaf 2021-03-09 21:48 ` Bart Schaefer 0 siblings, 2 replies; 23+ messages in thread From: Marlon Richert @ 2021-03-09 17:01 UTC (permalink / raw) To: Daniel Shahaf; +Cc: Zsh hackers list [-- Attachment #1: Type: text/plain, Size: 1823 bytes --] On Sun, Mar 7, 2021 at 7:22 PM Daniel Shahaf <d.s@daniel.shahaf.name> wrote: > If building from git, did you run Util/preconfig? > > What was configure's exit code? > > Did you run `make` (the default target) first? Here's my output for those steps: % Util/preconfigcd . && ./.preconfig [exit status 0] % configure [...] config.status: executing stamp-h commands cp: ./Doc/help.txt: No such file or directory zsh configuration ----------------- zsh version : 5.8.0.2-dev host operating system : x86_64-apple-darwin20.3.0 source code location : . compiler : gcc preprocessor flags : executable compiler flags : -Wall -Wmissing-prototypes -O2 module compiler flags : -Wall -Wmissing-prototypes -O2 -fno-common executable linker flags : -Wl,-x -rdynamic module linker flags : -Wl,-x -bundle -flat_namespace -undefined suppress library flags : -liconv -ldl -lncurses -lm -lc installation basename : zsh binary install path : /usr/local/bin man page install path : /usr/local/share/man info install path : /usr/local/share/info functions install path : /usr/local/share/zsh/5.8.0.2-dev/functions See config.modules for installed modules and functions. % make cd .. && /bin/sh $top_srcdir/Src/mkmakemod.sh Src Makemod creating Src/Makemod.in config.status: creating Src/Makemod rm -f stamp-modobjs.tmp mv: rename stamp-modobjs.tmp to stamp-modobjs: No such file or directory Updated `stamp-modobjs'. gcc -c -I. -I../Src -I../Src -I../Src/Zle -I. -DHAVE_CONFIG_H -Wall -Wmissing-prototypes -O2 -o main.o main.c main.c:31:10: fatal error: 'main.pro' file not found #include "main.pro" ^~~~~~~~~~ 1 error generated. make[2]: *** [main.o] Error 1 make[1]: *** [main.o] Error 2 make: *** [all] Error 1 [exit status 2] [-- Attachment #2: Type: text/html, Size: 2447 bytes --] ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: Bug + patch: `zstyle ':completion:*' menu select=long-list` fails to start menu selection 2021-03-09 17:01 ` Marlon Richert @ 2021-03-09 21:19 ` Daniel Shahaf 2021-03-09 21:48 ` Bart Schaefer 1 sibling, 0 replies; 23+ messages in thread From: Daniel Shahaf @ 2021-03-09 21:19 UTC (permalink / raw) To: Marlon Richert; +Cc: Zsh hackers list Marlon Richert wrote on Tue, Mar 09, 2021 at 19:01:54 +0200: > On Sun, Mar 7, 2021 at 7:22 PM Daniel Shahaf <d.s@daniel.shahaf.name> wrote: > > If building from git, did you run Util/preconfig? > > > > What was configure's exit code? > > > > Did you run `make` (the default target) first? > > Here's my output for those steps: > > % Util/preconfigcd . && ./.preconfig Looks like something mangled your copy/paste. > [exit status 0] > % configure > [...] > config.status: executing stamp-h commands > cp: ./Doc/help.txt: No such file or directory This error must be coming from here: 3205 dnl Copy pre-built man pages and help files, for tarball out-of-tree builds. 3206 for manpage in `cd ${srcdir} && echo Doc/*.1`; do 3207 if test x"$manpage" != x"Doc/*.1" && ! test -e "${manpage}"; then 3208 cp ${srcdir}/${manpage} ./Doc/ 3209 fi 3210 done 3211 if ! test -e Doc/help.txt; then 3212 cp ${srcdir}/Doc/help.txt ./Doc/ 3213 fi 3214 mkdir -p ./Doc/help 3215 for helpfile in `cd ${srcdir} && echo Doc/help/*`; do 3216 if test x"$helpfile" != x"Doc/help/*" && ! test -e "${helpfile}"; then 3217 cp ${srcdir}/${helpfile} ./Doc/help/ 3218 fi 3219 done I guess ./Doc/ doesn't exist for some reason, then? Were you building in a clean tree? That doesn't explain the main.pro error, but there isn't much point in debugging «make» issues until «configure» succeeds. Cheers, Daniel > % make > cd .. && /bin/sh $top_srcdir/Src/mkmakemod.sh Src Makemod > creating Src/Makemod.in > config.status: creating Src/Makemod > rm -f stamp-modobjs.tmp > mv: rename stamp-modobjs.tmp to stamp-modobjs: No such file or directory > Updated `stamp-modobjs'. > gcc -c -I. -I../Src -I../Src -I../Src/Zle -I. -DHAVE_CONFIG_H -Wall > -Wmissing-prototypes -O2 -o main.o main.c > main.c:31:10: fatal error: 'main.pro' file not found > #include "main.pro" > ^~~~~~~~~~ > 1 error generated. > make[2]: *** [main.o] Error 1 > make[1]: *** [main.o] Error 2 > make: *** [all] Error 1 > [exit status 2] ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: Bug + patch: `zstyle ':completion:*' menu select=long-list` fails to start menu selection 2021-03-09 17:01 ` Marlon Richert 2021-03-09 21:19 ` Daniel Shahaf @ 2021-03-09 21:48 ` Bart Schaefer 2021-03-10 7:21 ` Marlon Richert 1 sibling, 1 reply; 23+ messages in thread From: Bart Schaefer @ 2021-03-09 21:48 UTC (permalink / raw) To: Marlon Richert; +Cc: Daniel Shahaf, Zsh hackers list On Tue, Mar 9, 2021 at 9:03 AM Marlon Richert <marlon.richert@gmail.com> wrote: > > config.status: executing stamp-h commands > cp: ./Doc/help.txt: No such file or directory For Daniel: This is harmless, it means nroff isn't installed to generate the manual pages from which help.txt is extracted. Normal on MacOS. > zsh configuration This is all the same as mine except for > host operating system : x86_64-apple-darwin20.3.0 host operating system : x86_64-apple-darwin19.6.0 ... which I don't think should matter. You do have XCode installed? "autoheader" is available, for example? > % make > cd .. && /bin/sh $top_srcdir/Src/mkmakemod.sh Src Makemod > creating Src/Makemod.in > config.status: creating Src/Makemod > rm -f stamp-modobjs.tmp That's rather odd. I have: cd . && \ /bin/sh ./config.status Config/defs.mk config.status: creating Config/defs.mk cd . && \ /bin/sh ./config.status `echo ./Makefile | sed 's%^./%%'` config.status: creating Makefile cd . && autoheader echo > ./stamp-h.in cd . && /bin/sh ./config.status config.h stamp-h config.status: creating config.h config.status: config.h is unchanged config.status: executing stamp-h commands cd . && /bin/sh ./config.status config.modules && \ /bin/sh ./config.modules.sh config.status: executing config.modules commands creating ./config.modules creating ./config.modules cd .. && \ /bin/sh ./config.status `echo Src/Makefile | sed 's%^./%%'` config.status: creating Src/Makefile cd .. && /bin/sh $top_srcdir/Src/mkmakemod.sh Src Makemod creating Src/Makemod.in config.status: creating Src/Makemod ... followed by a lot of commands to build the ".syms" files and then to generate the ".pro" files from those, before finally getting to "rm -f stamp-modobjs.tmp" I think you need to run a "make realclean" and then start over. I think you have strange timestamps on some of the dependency files. ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: Bug + patch: `zstyle ':completion:*' menu select=long-list` fails to start menu selection 2021-03-09 21:48 ` Bart Schaefer @ 2021-03-10 7:21 ` Marlon Richert 2021-03-10 18:50 ` Bart Schaefer 0 siblings, 1 reply; 23+ messages in thread From: Marlon Richert @ 2021-03-10 7:21 UTC (permalink / raw) To: Bart Schaefer; +Cc: Daniel Shahaf, Zsh hackers list [-- Attachment #1: Type: text/plain, Size: 1848 bytes --] On Tue, Mar 9, 2021 at 11:48 PM Bart Schaefer <schaefer@brasslantern.com> wrote: > You do have XCode installed? "autoheader" is available, for example? Yes, and yes. I think you need to run a "make realclean" and then start over. I > think you have strange timestamps on some of the dependency files. > OK, I did `make realclean`, now `make` gives me this: % make cd .. && /bin/sh $top_srcdir/Src/mkmakemod.sh Src Makemod creating Src/Makemod.in config.status: creating Src/Makemod /Applications/Xcode.app/Contents/Developer/usr/bin/make -f Makemod prefix='/usr/local' exec_prefix='/usr/local' bindir='/usr/local/bin' libdir='/usr/local/lib' MODDIR='/usr/local/lib/zsh/5.8.0.2-dev' infodir='/usr/local/share/info' mandir='/usr/local/share/man' datadir='/usr/local/share' fndir='/usr/local/share/zsh/5.8.0.2-dev/functions' htmldir='/usr/local/share/zsh/htmldoc' runhelpdir='/usr/local/share/zsh/5.8.0.2-dev/help' CC='gcc' CPPFLAGS='' DEFS='-DHAVE_CONFIG_H' CFLAGS='-Wall -Wmissing-prototypes -O2' LDFLAGS='-Wl,-x' EXTRA_LDFLAGS='-rdynamic' DLCFLAGS='-fno-common' DLLDFLAGS='-bundle -flat_namespace -undefined suppress' LIBLDFLAGS='' EXELDFLAGS='' LIBS='-liconv -ldl -lncurses -lm -lc' DL_EXT='so' DLLD='gcc' AWK='gawk' ANSI2KNR=': ansi2knr' YODL=': yodl ' YODL2TXT=': yodl2txt' YODL2HTML=': yodl2html' FUNCTIONS_INSTALL='' tzsh='zsh' prep echo 'timestamp for *.mdd files' > ../Src/modules.stamp rm -f stamp-modobjs.tmp mv: rename stamp-modobjs.tmp to stamp-modobjs: No such file or directory Updated `stamp-modobjs'. gcc -c -I. -I../Src -I../Src -I../Src/Zle -I. -DHAVE_CONFIG_H -Wall -Wmissing-prototypes -O2 -o main.o main.c main.c:30:10: fatal error: 'zsh.mdh' file not found #include "zsh.mdh" ^~~~~~~~~ 1 error generated. make[2]: *** [main.o] Error 1 make[1]: *** [main.o] Error 2 make: *** [all] Error 1 [exit status 2 ] [-- Attachment #2: Type: text/html, Size: 3208 bytes --] ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: Bug + patch: `zstyle ':completion:*' menu select=long-list` fails to start menu selection 2021-03-10 7:21 ` Marlon Richert @ 2021-03-10 18:50 ` Bart Schaefer 2021-03-11 2:17 ` Bart Schaefer 2021-03-11 7:33 ` Marlon Richert 0 siblings, 2 replies; 23+ messages in thread From: Bart Schaefer @ 2021-03-10 18:50 UTC (permalink / raw) To: Marlon Richert; +Cc: Daniel Shahaf, Zsh hackers list On Tue, Mar 9, 2021 at 11:21 PM Marlon Richert <marlon.richert@gmail.com> wrote: > > OK, I did `make realclean`, now `make` gives me this: I meant that after "make realclean" you need to start all the way back at running Util/preconfig and configure. Did you? A correct build should start out like this: cd .. && /bin/sh $top_srcdir/Src/mkmakemod.sh Src Makemod creating Src/Makemod.in config.status: creating Src/Makemod mawk -f ./signames1.awk /usr/include/x86_64-linux-gnu/bits/signum.h /usr/include/x86_64-linux-gnu/bits/signum-generic.h >sigtmp.c case "`gcc -E --version </dev/null 2>&1`" in \ *"Free Software Foundation"*) \ gcc -E -P sigtmp.c >sigtmp.out;; \ *) \ gcc -E sigtmp.c >sigtmp.out;; \ esac mawk -f ./signames2.awk sigtmp.out > signames.c rm -f sigtmp.c sigtmp.out grep 'define.*SIGCOUNT' signames.c > sigcount.h Updated `zsh.mdh'. echo 'timestamp for zsh.mdh against zsh.mdd' > zsh.mdhs It appears for example that the commands to create signames.c are not being executed for your build, nor is anything else that employs $(AWK) (which my configure pass assigns AWK = mawk). ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: Bug + patch: `zstyle ':completion:*' menu select=long-list` fails to start menu selection 2021-03-10 18:50 ` Bart Schaefer @ 2021-03-11 2:17 ` Bart Schaefer 2021-03-11 7:33 ` Marlon Richert 1 sibling, 0 replies; 23+ messages in thread From: Bart Schaefer @ 2021-03-11 2:17 UTC (permalink / raw) To: Marlon Richert; +Cc: Daniel Shahaf, Zsh hackers list On Wed, Mar 10, 2021 at 10:50 AM Bart Schaefer <schaefer@brasslantern.com> wrote: > > A correct build should start out like this: That was a Ubuntu build. Here's the same fragment for MacOS: cd .. && /bin/sh $top_srcdir/Src/mkmakemod.sh Src Makemod creating Src/Makemod.in config.status: creating Src/Makemod awk -f ./signames1.awk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/signal.h >sigtmp.c case "`gcc -E --version </dev/null 2>&1`" in \ *"Free Software Foundation"*) \ gcc -E -P sigtmp.c >sigtmp.out;; \ *) \ gcc -E sigtmp.c >sigtmp.out;; \ esac awk -f ./signames2.awk sigtmp.out > signames.c rm -f sigtmp.c sigtmp.out grep 'define.*SIGCOUNT' signames.c > sigcount.h Updated `zsh.mdh'. echo 'timestamp for zsh.mdh against zsh.mdd' > zsh.mdhs awk -f ../Src/makepro.awk builtin.c Src > builtin.syms ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: Bug + patch: `zstyle ':completion:*' menu select=long-list` fails to start menu selection 2021-03-10 18:50 ` Bart Schaefer 2021-03-11 2:17 ` Bart Schaefer @ 2021-03-11 7:33 ` Marlon Richert 2021-03-11 18:22 ` Bart Schaefer 2021-03-12 13:11 ` Marlon Richert 1 sibling, 2 replies; 23+ messages in thread From: Marlon Richert @ 2021-03-11 7:33 UTC (permalink / raw) To: Bart Schaefer; +Cc: Daniel Shahaf, Zsh hackers list [-- Attachment #1: Type: text/plain, Size: 2064 bytes --] On Wed, Mar 10, 2021 at 8:50 PM Bart Schaefer <schaefer@brasslantern.com> wrote: > I meant that after "make realclean" you need to start all the way back > at running Util/preconfig and configure. Did you? > Yes, I did the following: % make realclean % Util/preconfig % configure % make > It appears for example that the commands to create signames.c are not > being executed for your build, nor is anything else that employs > $(AWK) (which my configure pass assigns AWK = mawk). > I uninstalled `gawk`, to see if that makes any difference, then ran the steps above again, but `make` still fails: cd .. && /bin/sh $top_srcdir/Src/mkmakemod.sh Src Makemod creating Src/Makemod.in config.status: creating Src/Makemod /Applications/Xcode.app/Contents/Developer/usr/bin/make -f Makemod prefix='/usr/local' exec_prefix='/usr/local' bindir='/usr/local/bin' libdir='/usr/local/lib' MODDIR='/usr/local/lib/zsh/5.8.0.2-dev' infodir='/usr/local/share/info' mandir='/usr/local/share/man' datadir='/usr/local/share' fndir='/usr/local/share/zsh/5.8.0.2-dev/functions' htmldir='/usr/local/share/zsh/htmldoc' runhelpdir='/usr/local/share/zsh/5.8.0.2-dev/help' CC='gcc' CPPFLAGS='' DEFS='-DHAVE_CONFIG_H' CFLAGS='-Wall -Wmissing-prototypes -O2' LDFLAGS='-Wl,-x' EXTRA_LDFLAGS='-rdynamic' DLCFLAGS='-fno-common' DLLDFLAGS='-bundle -flat_namespace -undefined suppress' LIBLDFLAGS='' EXELDFLAGS='' LIBS='-liconv -ldl -lncurses -lm -lc' DL_EXT='so' DLLD='gcc' AWK='awk' ANSI2KNR=': ansi2knr' YODL=': yodl ' YODL2TXT=': yodl2txt' YODL2HTML=': yodl2html' FUNCTIONS_INSTALL='' tzsh='zsh' prep echo 'timestamp for *.mdd files' > ../Src/modules.stamp rm -f stamp-modobjs.tmp mv: rename stamp-modobjs.tmp to stamp-modobjs: No such file or directory Updated `stamp-modobjs'. gcc -c -I. -I../Src -I../Src -I../Src/Zle -I. -DHAVE_CONFIG_H -Wall -Wmissing-prototypes -O2 -o main.o main.c main.c:30:10: fatal error: 'zsh.mdh' file not found #include "zsh.mdh" ^~~~~~~~~ 1 error generated. make[2]: *** [main.o] Error 1 make[1]: *** [main.o] Error 2 make: *** [all] Error 1 [-- Attachment #2: Type: text/html, Size: 3884 bytes --] ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: Bug + patch: `zstyle ':completion:*' menu select=long-list` fails to start menu selection 2021-03-11 7:33 ` Marlon Richert @ 2021-03-11 18:22 ` Bart Schaefer 2021-03-12 13:11 ` Marlon Richert 1 sibling, 0 replies; 23+ messages in thread From: Bart Schaefer @ 2021-03-11 18:22 UTC (permalink / raw) To: Marlon Richert; +Cc: Daniel Shahaf, Zsh hackers list On Wed, Mar 10, 2021 at 11:34 PM Marlon Richert <marlon.richert@gmail.com> wrote: > > I uninstalled `gawk`, to see if that makes any difference, then ran the steps above again, but `make` still fails: Do you have multi-threaded compilation enabled by any chance? If so, turn that off. "make prep" has to execute serially. What happens if you do for example "make --jobs=1 prep" ? ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: Bug + patch: `zstyle ':completion:*' menu select=long-list` fails to start menu selection 2021-03-11 7:33 ` Marlon Richert 2021-03-11 18:22 ` Bart Schaefer @ 2021-03-12 13:11 ` Marlon Richert 2021-03-12 13:36 ` Peter Stephenson 1 sibling, 1 reply; 23+ messages in thread From: Marlon Richert @ 2021-03-12 13:11 UTC (permalink / raw) To: Bart Schaefer; +Cc: Daniel Shahaf, Zsh hackers list [-- Attachment #1: Type: text/plain, Size: 2416 bytes --] I found the culprit: I had export GREP_OPTIONS='--color=always' in my `.zshrc` file and that mangled the .mdd file names. `make` now succeeds and so does `make check`. :) On Thu, Mar 11, 2021 at 9:33 AM Marlon Richert <marlon.richert@gmail.com> wrote: > On Wed, Mar 10, 2021 at 8:50 PM Bart Schaefer <schaefer@brasslantern.com> > wrote: > >> I meant that after "make realclean" you need to start all the way back >> at running Util/preconfig and configure. Did you? >> > > Yes, I did the following: > > % make realclean > % Util/preconfig > % configure > % make > > > >> It appears for example that the commands to create signames.c are not >> being executed for your build, nor is anything else that employs >> $(AWK) (which my configure pass assigns AWK = mawk). >> > > I uninstalled `gawk`, to see if that makes any difference, then ran the > steps above again, but `make` still fails: > > cd .. && /bin/sh $top_srcdir/Src/mkmakemod.sh Src Makemod > creating Src/Makemod.in > config.status: creating Src/Makemod > /Applications/Xcode.app/Contents/Developer/usr/bin/make -f Makemod > prefix='/usr/local' exec_prefix='/usr/local' bindir='/usr/local/bin' > libdir='/usr/local/lib' MODDIR='/usr/local/lib/zsh/5.8.0.2-dev' > infodir='/usr/local/share/info' mandir='/usr/local/share/man' > datadir='/usr/local/share' > fndir='/usr/local/share/zsh/5.8.0.2-dev/functions' > htmldir='/usr/local/share/zsh/htmldoc' > runhelpdir='/usr/local/share/zsh/5.8.0.2-dev/help' CC='gcc' CPPFLAGS='' > DEFS='-DHAVE_CONFIG_H' CFLAGS='-Wall -Wmissing-prototypes -O2' > LDFLAGS='-Wl,-x' EXTRA_LDFLAGS='-rdynamic' DLCFLAGS='-fno-common' > DLLDFLAGS='-bundle -flat_namespace -undefined suppress' LIBLDFLAGS='' > EXELDFLAGS='' LIBS='-liconv -ldl -lncurses -lm -lc' DL_EXT='so' DLLD='gcc' > AWK='awk' ANSI2KNR=': ansi2knr' YODL=': yodl ' YODL2TXT=': yodl2txt' > YODL2HTML=': yodl2html' FUNCTIONS_INSTALL='' tzsh='zsh' prep > echo 'timestamp for *.mdd files' > ../Src/modules.stamp > rm -f stamp-modobjs.tmp > mv: rename stamp-modobjs.tmp to stamp-modobjs: No such file or directory > Updated `stamp-modobjs'. > gcc -c -I. -I../Src -I../Src -I../Src/Zle -I. -DHAVE_CONFIG_H -Wall > -Wmissing-prototypes -O2 -o main.o main.c > main.c:30:10: fatal error: 'zsh.mdh' file not found > #include "zsh.mdh" > ^~~~~~~~~ > 1 error generated. > make[2]: *** [main.o] Error 1 > make[1]: *** [main.o] Error 2 > make: *** [all] Error 1 > [-- Attachment #2: Type: text/html, Size: 4792 bytes --] ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: Bug + patch: `zstyle ':completion:*' menu select=long-list` fails to start menu selection 2021-03-12 13:11 ` Marlon Richert @ 2021-03-12 13:36 ` Peter Stephenson 2021-03-12 14:14 ` Daniel Shahaf 0 siblings, 1 reply; 23+ messages in thread From: Peter Stephenson @ 2021-03-12 13:36 UTC (permalink / raw) To: Zsh hackers list > On 12 March 2021 at 13:11 Marlon Richert <marlon.richert@gmail.com> wrote: > > > I found the culprit: I had > > export GREP_OPTIONS='--color=always' > > in my `.zshrc` file and that mangled the .mdd file names. It's probably worth having the following. It doesn't cover all the possible cases where you can get into trouble, but it's a useful blanket for the standard case where everything is done immediately from configure. pws diff --git a/configure.ac b/configure.ac index 16dafac05..41006d67d 100644 --- a/configure.ac +++ b/configure.ac @@ -30,6 +30,9 @@ AC_CONFIG_SRCDIR([Src/zsh.h]) AC_PREREQ([2.69]) AC_CONFIG_HEADER(config.h) +dnl Configure uses grep widely, make sure output is uncorrupted. +unset GREP_OPTIONS + dnl What version of zsh are we building ? . ${srcdir}/Config/version.mk echo "configuring for zsh $VERSION" ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: Bug + patch: `zstyle ':completion:*' menu select=long-list` fails to start menu selection 2021-03-12 13:36 ` Peter Stephenson @ 2021-03-12 14:14 ` Daniel Shahaf 2021-03-12 20:53 ` Mikael Magnusson [not found] ` <884654866.425858.1615560127191@mail2.virginmedia.com> 0 siblings, 2 replies; 23+ messages in thread From: Daniel Shahaf @ 2021-03-12 14:14 UTC (permalink / raw) To: zsh-workers Peter Stephenson wrote on Fri, 12 Mar 2021 13:36 +00:00: > > > On 12 March 2021 at 13:11 Marlon Richert <marlon.richert@gmail.com> wrote: > > > > > > I found the culprit: I had > > > > export GREP_OPTIONS='--color=always' > > > > in my `.zshrc` file and that mangled the .mdd file names. > > It's probably worth having the following. It doesn't cover all the > possible cases where you can get into trouble, but it's a useful > blanket for the standard case where everything is done immediately > from configure. > I'm not sure I agree. - This seems to be a cases of "hard cases make bad law". Setting --color=always in the environment will break any script that expects grep(1)'s standard semantics, not just configure. The patch just papers over the problem. - We shouldn't second-guess the user. If the user has GREP_OPTIONS set in the environment, that might actually be needed in order to have grep(1) behave correctly. What if some system uses GREP_OPTIONS to make its grep(1) tool behave POSIX compatibly? - If this fix is needed, we should send it to autoconf upstream to be incorporated into AC_PROG_GREP. Instead, I propose: - Audit configure.ac and make sure we use $GREP rather than grep. Perhaps push this into the makefiles and build scripts too. - Consider issueing a notice if GREP_OPTIONS is set, or proposing to upstream to have AC_PROG_GREP do so. - Sending a documentation patch to grep(1)'s man page to point out that using --color=always globally or on the left hand side of a pipe is inadvisable. Makes sense? Cheers, Daniel > diff --git a/configure.ac b/configure.ac > index 16dafac05..41006d67d 100644 > --- a/configure.ac > +++ b/configure.ac > @@ -30,6 +30,9 @@ AC_CONFIG_SRCDIR([Src/zsh.h]) > AC_PREREQ([2.69]) > AC_CONFIG_HEADER(config.h) > > +dnl Configure uses grep widely, make sure output is uncorrupted. > +unset GREP_OPTIONS > + > dnl What version of zsh are we building ? > . ${srcdir}/Config/version.mk > echo "configuring for zsh $VERSION" > > ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: Bug + patch: `zstyle ':completion:*' menu select=long-list` fails to start menu selection 2021-03-12 14:14 ` Daniel Shahaf @ 2021-03-12 20:53 ` Mikael Magnusson [not found] ` <884654866.425858.1615560127191@mail2.virginmedia.com> 1 sibling, 0 replies; 23+ messages in thread From: Mikael Magnusson @ 2021-03-12 20:53 UTC (permalink / raw) To: Daniel Shahaf; +Cc: zsh-workers On 3/12/21, Daniel Shahaf <d.s@daniel.shahaf.name> wrote: > Peter Stephenson wrote on Fri, 12 Mar 2021 13:36 +00:00: >> >> > On 12 March 2021 at 13:11 Marlon Richert <marlon.richert@gmail.com> >> > wrote: >> > >> > >> > I found the culprit: I had >> > >> > export GREP_OPTIONS='--color=always' >> > >> > in my `.zshrc` file and that mangled the .mdd file names. >> >> It's probably worth having the following. It doesn't cover all the >> possible cases where you can get into trouble, but it's a useful >> blanket for the standard case where everything is done immediately >> from configure. >> > > I'm not sure I agree. > > - This seems to be a cases of "hard cases make bad law". Setting > --color=always in the environment will break any script that expects > grep(1)'s standard semantics, not just configure. The patch just > papers over the problem. > > - We shouldn't second-guess the user. If the user has GREP_OPTIONS set > in the environment, that might actually be needed in order to have > grep(1) behave correctly. What if some system uses GREP_OPTIONS to > make its grep(1) tool behave POSIX compatibly? > > - If this fix is needed, we should send it to autoconf upstream to be > incorporated into AC_PROG_GREP. > > Instead, I propose: > > - Audit configure.ac and make sure we use $GREP rather than grep. > Perhaps push this into the makefiles and build scripts too. > > - Consider issueing a notice if GREP_OPTIONS is set, or proposing to > upstream to have AC_PROG_GREP do so. > > - Sending a documentation patch to grep(1)'s man page to point out that > using --color=always globally or on the left hand side of a pipe is > inadvisable. For what it's worth, my grep (GNU grep 3.1) says this when I use GREP_OPTIONS: % GREP_OPTIONS=hi grep grep: warning: GREP_OPTIONS is deprecated; please use an alias or script -- Mikael Magnusson ^ permalink raw reply [flat|nested] 23+ messages in thread
[parent not found: <884654866.425858.1615560127191@mail2.virginmedia.com>]
* Re: Bug + patch: `zstyle ':completion:*' menu select=long-list` fails to start menu selection [not found] ` <884654866.425858.1615560127191@mail2.virginmedia.com> @ 2021-03-13 13:40 ` Daniel Shahaf 2021-03-13 17:38 ` Peter Stephenson 0 siblings, 1 reply; 23+ messages in thread From: Daniel Shahaf @ 2021-03-13 13:40 UTC (permalink / raw) To: Peter Stephenson; +Cc: zsh-workers Replying on-list with permission and fullquote. Peter Stephenson wrote on Fri, 12 Mar 2021 14:42 +00:00: > > On 12 March 2021 at 14:14 Daniel Shahaf <d.s@daniel.shahaf.name> wrote: > > Peter Stephenson wrote on Fri, 12 Mar 2021 13:36 +00:00: > > > > > > > On 12 March 2021 at 13:11 Marlon Richert <marlon.richert@gmail.com> wrote: > > > > > > > > > > > > I found the culprit: I had > > > > > > > > export GREP_OPTIONS='--color=always' > > > > > > > > in my `.zshrc` file and that mangled the .mdd file names. > > > > > > It's probably worth having the following. It doesn't cover all the > > > possible cases where you can get into trouble, but it's a useful > > > blanket for the standard case where everything is done immediately > > > from configure. > > > > > > > I'm not sure I agree. > > > > - This seems to be a cases of "hard cases make bad law". Setting > > --color=always in the environment will break any script that expects > > grep(1)'s standard semantics, not just configure. The patch just > > papers over the problem. > > > > - We shouldn't second-guess the user. If the user has GREP_OPTIONS set > > in the environment, that might actually be needed in order to have > > grep(1) behave correctly. What if some system uses GREP_OPTIONS to > > make its grep(1) tool behave POSIX compatibly? > > I think that's missing the point of the patch, which is that for anyone > setting up zsh, configure should just run in a sandbox with whatever is > going on outside irrelevant to it; It is an API promise of autoconf that AC_PROG_GREP will use the environment variable $GREP to find a grep program. I would therefore expect «GREP=/bin/foo GREP_OPTIONS=bar ./configure» to also be supported, even for values of foo other than GNU grep. > it's an implementation detail that it's a shell script at all. Well, yes, configure could be implemented in Rust for all anyone cares, but it would still have to obey that API promise about the "GREP" environment variable. > GREP_OPTIONS is a user extension, there's no > question of it being needed for POSIX --- GNU do things this way exactly so > that if you have a vanilla environment it is basically (but not necessarily > completely, as this is a complicated area) POSIXy. > In GNU's case, yes, but non-GNU implementations of grep may also use envvars named GREP_OPTIONS, and your patch could easily break those. Even with GNU grep, I could imagine someone setting GREP_OPTIONS=--exclude='.git', and then a configure script using «grep -R» if $GREP happened to be GNU grep. (even if zsh's configure script doesn't do that) Also, someone might run «CC=/my/wrapper ./configure» where /my/wrapper is a shell script that uses grep and relies on GREP_OPTIONS being set. > If you do feel the need to pursue a more complicated path, however, you're > welcome to do so and I'll keep out of the way. > Let's take a step back, please. You proposed a change. I don't think that change is a good one to make. For instance, consider that if the patch is a good change, it would need to be applied to every single configure script out there; actually, to _every single portable script_ that uses grep. I view the issue as a bug in Marlon's dotfiles; a bug which he has discovered and fixed. The failure mode wasn't ideal, of course, and we could look into improving that; for example, by s/grep/$GREP/ as I suggested and proposing a "look for colour codes in the output" logic to AC_PROG_GREP. I did propose further alternatives upthread and I welcome feedback and questions on them. And needless to say, I didn't mean to discourage you from participating. > > - If this fix is needed, we should send it to autoconf upstream to be > > incorporated into AC_PROG_GREP. > > That does sound entirely reasonable, if no one's noticed yet. *nod* Cheers, Daniel ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: Bug + patch: `zstyle ':completion:*' menu select=long-list` fails to start menu selection 2021-03-13 13:40 ` Daniel Shahaf @ 2021-03-13 17:38 ` Peter Stephenson 2021-03-13 18:08 ` Bart Schaefer 0 siblings, 1 reply; 23+ messages in thread From: Peter Stephenson @ 2021-03-13 17:38 UTC (permalink / raw) To: zsh-workers On Sat, 2021-03-13 at 13:40 +0000, Daniel Shahaf wrote: > Replying on-list with permission and fullquote. Yes, sorry, my mistake. Just to avoid leaving this hanging: if a two-code-word work fix to a single script doesn't seem appropriate, I will simply bow out at this point; I was not and am not interested in the wider repercussions of GREP_OPTIONS. Indeed, you're certainly correct that the usage in question can cause much wider mayhem we can't fix --- no doubt with the result noted by Mikael that it's being removed. pws ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: Bug + patch: `zstyle ':completion:*' menu select=long-list` fails to start menu selection 2021-03-13 17:38 ` Peter Stephenson @ 2021-03-13 18:08 ` Bart Schaefer 2021-03-14 7:39 ` dana 0 siblings, 1 reply; 23+ messages in thread From: Bart Schaefer @ 2021-03-13 18:08 UTC (permalink / raw) To: Peter Stephenson; +Cc: Zsh hackers list [-- Attachment #1: Type: text/plain, Size: 28 bytes --] FWIW, I'm with PWS on this. [-- Attachment #2: Type: text/html, Size: 65 bytes --] ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: Bug + patch: `zstyle ':completion:*' menu select=long-list` fails to start menu selection 2021-03-13 18:08 ` Bart Schaefer @ 2021-03-14 7:39 ` dana 0 siblings, 0 replies; 23+ messages in thread From: dana @ 2021-03-14 7:39 UTC (permalink / raw) To: Zsh hackers list I was under the impression that autoconf unsets GREP_OPTIONS itself. The documentation says it does: https://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.70/html_node/Special-Shell-Variables.html To me it doesn't seem very useful to break the configure script's expectations of how grep behaves, or to make it use a weird wrapper that depends on external (to the script) environment variables to behave like a grep is supposed to. But i don't actually know much about autoconf PS: GREP_OPTIONS support was removed from GNU grep entirely a few months ago dana ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: Bug + patch: `zstyle ':completion:*' menu select=long-list` fails to start menu selection 2021-03-04 20:17 ` Daniel Shahaf 2021-03-04 22:26 ` Marlon Richert @ 2021-03-14 9:30 ` Marlon Richert 2021-03-17 18:01 ` dana 1 sibling, 1 reply; 23+ messages in thread From: Marlon Richert @ 2021-03-14 9:30 UTC (permalink / raw) To: Daniel Shahaf, Zsh hackers list, Bart Schaefer On Thu, Mar 4, 2021 at 10:17 PM Daniel Shahaf <d.s@daniel.shahaf.name> wrote: > Thanks. Haven't reviewed the patch, but assuming it's correct, it'd be > great to have this test upgraded to a proper regression test; see > Test/README in the source tree. OK, I added a test to the patch, which fails before applying the patch and succeeds afterwards. Please review. diff --git Completion/Base/Core/_main_complete Completion/Base/Core/_main_complete index 663f7557..9d90b0fe 100644 --- Completion/Base/Core/_main_complete +++ Completion/Base/Core/_main_complete @@ -244,7 +244,7 @@ if [[ $compstate[old_list] = keep || nm -gt 1 ]]; then _menu_style=( "$_menu_style[@]" "$_def_menu_style[@]" ) - if [[ "$compstate[list]" = *list && tmp -gt LINES && + if [[ "$compstate[list]" = *list(| *) && tmp -gt LINES && ( -n "$_menu_style[(r)select=long-list]" || -n "$_menu_style[(r)(yes|true|on|1)=long-list]" ) ]]; then compstate[insert]=menu diff --git Test/Y01completion.ztst Test/Y01completion.ztst index 65f341d4..02094cad 100644 --- Test/Y01completion.ztst +++ Test/Y01completion.ztst @@ -237,6 +237,40 @@ F:regression test workers/31611 >FI:{file1} >FI:{file2} + comptesteval '_tst() { local disp=( {a..z} ); compadd -ld disp $disp[@]; comppostfuncs=( _pst ) }' + comptesteval '_pst() { local disp=( "<INSERT>$compstate[insert]</INSERT>" ); compadd -Qld disp $disp }' + comptesteval "zstyle ':completion:*' menu select=long-list" + comptest $'tst \C-d' +0: menu select=long-list starts menu selection for list widgets +>NO:{<INSERT>menu</INSERT>} +>NO:{a} +>NO:{b} +>NO:{c} +>NO:{d} +>NO:{e} +>NO:{f} +>NO:{g} +>NO:{h} +>NO:{i} +>NO:{j} +>NO:{k} +>NO:{l} +>NO:{m} +>NO:{n} +>NO:{o} +>NO:{p} +>NO:{q} +>NO:{r} +>NO:{s} +>NO:{t} +>NO:{u} +>NO:{v} +>NO:{w} +>NO:{x} +>NO:{y} +>NO:{z} + + %clean zmodload -ui zsh/zpty ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: Bug + patch: `zstyle ':completion:*' menu select=long-list` fails to start menu selection 2021-03-14 9:30 ` Marlon Richert @ 2021-03-17 18:01 ` dana 2021-03-25 0:46 ` Daniel Shahaf 0 siblings, 1 reply; 23+ messages in thread From: dana @ 2021-03-17 18:01 UTC (permalink / raw) To: Marlon Richert; +Cc: Zsh hackers list On 14 Mar 2021, at 04:30, Marlon Richert <marlon.richert@gmail.com> wrote: > OK, I added a test to the patch, which fails before applying the patch > and succeeds afterwards. Please review. It seems OK as far as i can tell. I committed it dana ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: Bug + patch: `zstyle ':completion:*' menu select=long-list` fails to start menu selection 2021-03-17 18:01 ` dana @ 2021-03-25 0:46 ` Daniel Shahaf 0 siblings, 0 replies; 23+ messages in thread From: Daniel Shahaf @ 2021-03-25 0:46 UTC (permalink / raw) To: dana; +Cc: Marlon Richert, Zsh hackers list dana wrote on Wed, Mar 17, 2021 at 13:01:22 -0500: > On 14 Mar 2021, at 04:30, Marlon Richert <marlon.richert@gmail.com> wrote: > > OK, I added a test to the patch, which fails before applying the patch > > and succeeds afterwards. Please review. > > It seems OK as far as i can tell. I committed it More than a bit late, but: Thanks a lot for adding the test, Marlon! Daniel ^ permalink raw reply [flat|nested] 23+ messages in thread
end of thread, other threads:[~2021-03-25 0:46 UTC | newest] Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2021-03-04 8:56 Bug + patch: `zstyle ':completion:*' menu select=long-list` fails to start menu selection Marlon Richert 2021-03-04 20:17 ` Daniel Shahaf 2021-03-04 22:26 ` Marlon Richert 2021-03-07 17:22 ` Daniel Shahaf 2021-03-09 17:01 ` Marlon Richert 2021-03-09 21:19 ` Daniel Shahaf 2021-03-09 21:48 ` Bart Schaefer 2021-03-10 7:21 ` Marlon Richert 2021-03-10 18:50 ` Bart Schaefer 2021-03-11 2:17 ` Bart Schaefer 2021-03-11 7:33 ` Marlon Richert 2021-03-11 18:22 ` Bart Schaefer 2021-03-12 13:11 ` Marlon Richert 2021-03-12 13:36 ` Peter Stephenson 2021-03-12 14:14 ` Daniel Shahaf 2021-03-12 20:53 ` Mikael Magnusson [not found] ` <884654866.425858.1615560127191@mail2.virginmedia.com> 2021-03-13 13:40 ` Daniel Shahaf 2021-03-13 17:38 ` Peter Stephenson 2021-03-13 18:08 ` Bart Schaefer 2021-03-14 7:39 ` dana 2021-03-14 9:30 ` Marlon Richert 2021-03-17 18:01 ` dana 2021-03-25 0:46 ` Daniel Shahaf
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).