From luke at mewburn.net Mon May 15 12:41:31 2023 From: luke at mewburn.net (Luke Mewburn) Date: Mon, 15 May 2023 22:41:31 +1000 Subject: [Tcsh] [UCE] tcsh-6.24.08 is now available In-Reply-To: References: Message-ID: On 23-04-15 11:54, Kimmo Suominen wrote: | On Sat, 15 Apr 2023 at 11:47, Kimmo Suominen wrote: | > ------------------------ | > > setsid -w sh -c 'tcsh -f -c "echo #no comment"' | > #no comment | > > setsid -w sh -c 'tcsh -f -c "echo #no comment"' < /dev/null | > | > ------------------------ | > | > I understand the "$edit" case, but I don't understand the "#no comment" case. | | But I guess it has to do with ed_Init() somehow as well, because | making the shell interactive with the "-i" flag makes a difference: | | ------------------------ | : beowulf:~; setsid -w sh -c 'tcsh -f -i -c "echo #no comment"' < /dev/null | #no comment | ------------------------ I've investigated this further. The difference in behaviour is to be expected, and turns out is actually documented: When the shell's input is not a terminal, the character ?#? is taken to begin a comment. Each ?#? and the rest of the input line on which it ap? pears is discarded before further parsing. The mechanism in the testsuite to detect if stdin is a tty or not doesn't quite work and always causes the test group to be skipped: AT_CHECK([if [ ! -t 0 ]; then exit 77; fi],, [Skipping comment tests]) probably due to m4 parsing/quoting of if [. I'll replaced this with something like: AS_IF([test -t 0], [ # tests when stdin is a tty and not reading from file ], [ # tests when stdin is not a tty or reading from file ]) I've fixed this up in pull request: https://github.com/tcsh-org/tcsh/pull/75 Then it works if I do: make check TESTSUITEFLAGS='-k Comments -k edit' or make check TESTSUITEFLAGS='-k Comments -k edit' From luke at mewburn.net Mon May 15 12:46:06 2023 From: luke at mewburn.net (Luke Mewburn) Date: Mon, 15 May 2023 22:46:06 +1000 Subject: [Tcsh] [UCE] tcsh-6.24.08 is now available In-Reply-To: References: Message-ID: On 23-04-15 11:47, Kimmo Suominen wrote: | [Resending with "reply to all"] | | On Sat, 15 Apr 2023 at 02:59, Luke Mewburn wrote: | > I'll try and debug further why the original problem exists | > that requires those two tests to be skipped. | | A proper fix would be nice, indeed. I just wanted to get | non-interactive builds working as before, and this was the easy way | out. :) That's fine :) I did work out a proper fix - see other reply. | > Possibly related, but I've also noticed other weird edge cases about terminal | > setup on startup that may or may not be related, that could be worth debugging. | | sh.c from line 1095 onwards: | - if (intty = isatty(SHIN)) returns zero, "edit" is unset | - intty |= intact; /* "tcsh -i" */ | | sh.c from line 1378 onwards: | - if (intty && !targinp) { ed_Init(); } /* "tcsh -c" sets targinp */ | | It is ed_Init() that would call GetTermCaps() during shell startup. | | If GetTermCaps() has not been done (!GotTermCaps), telltc (and echotc | and settc) will also call GetTermCaps(). Thanks for the tip. I'll look into this further. I'll investigate the issues with always setting up the terminal with ed_Init(), versus adding another mechanism to do this explicitly that doesn't require the telltc/echotc as the first command. Being able to test various "terminal size" related behavior in the testsuite will be good (e.g., ls-F column behavior). regards, Luke. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 195 bytes Desc: not available URL: From merijn.brand at procura.nl Thu May 25 09:49:38 2023 From: merijn.brand at procura.nl (H.Merijn Brand) Date: Thu, 25 May 2023 09:49:38 -0000 Subject: [Tcsh] Tab used as completion from paste Message-ID: <20230525101605.69e15b4e@pc09> tab-completion is extremely useful, but very counterproductive when a clipboard paste includes a tab. I notice that when I copy text from a plain-text source (editor, mail, browser, whatever) and I paste it in xterm/tcsh, any tabs in the pasted buffer are interpreted as completion tab, causing a lot of fails! This is not new, but is there an option to *paste* tabs as-is? Or translate tabs as spaces This happens for Shift-Insert and Middle-Mouse-Button-Paste the like. -- H.Merijn Brand (088) 770 81 21 Procura https://procura.nl https://vrijbrp.nl KvK 37140650 no HTML/LOGOs/DISCLAIMERS! https://tux.nl/email.html -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 488 bytes Desc: OpenPGP digital signature URL: