[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openbsd-bugs
Subject:    Re: csh -q not documented
From:       Andras Farkas <deepbluemistake () gmail ! com>
Date:       2019-03-21 22:15:00
Message-ID: CAA0nTRupx5rqg8iVF5Or5a6ef=3-pKEQo2nNgarYxgmQ6KT3Kw () mail ! gmail ! com
[Download RAW message or body]

Ping.  There are three cases of csh behavior in OpenBSD's csh that are
currently undocumented in its man page.

On Wed, Feb 20, 2019 at 11:59 PM Andras Farkas
<deepbluemistake@gmail.com> wrote:
>
> Found another undocumented csh feature by looking online at tcsh-related stuff.
> Along with being able to use !8, !!, (where !! is equivalent to !-1)
> etc. as history substitutions, !# substitutes as the
> currently-being-typed command.
> > case '#': /* !# is command being typed in (mrh) */
> https://cvsweb.openbsd.org/src/bin/csh/lex.c?rev=1.30&content-type=text/x-cvsweb-markup
> To test:
> echo foo bar !# baz blep
>
> On Wed, Feb 20, 2019 at 9:56 PM Andras Farkas <deepbluemistake@gmail.com> wrote:
> >
> > I was reading tcsh's documentation and it mentioned the -q option
> > exists in other csh implementations but is often undocumented.
> > Comparing behavior between csh -f and csh -fq on OpenBSD 6.4 (though I
> > suspect the version doesn't matter for this) showed that the q option
> > is indeed accepted and used, as in the latter case, ^\ (SIGQUIT)
> > causes csh to quit and dump core, unlike in the former case.
> > The source:
> > > case 'q': /* -q (Undoc'd) ... die on quit */
> > https://cvsweb.openbsd.org/src/bin/csh/csh.c?rev=1.45&content-type=text/x-cvsweb-markup
> > confirms this.
> > I'm unsure how to best phrase this in csh's man page, though, other
> > than simply adopting the wording used in tcsh's man page.
> >
> > It also turns out the other of the two things in tcsh's man page
> > labeled as "usually undocumented" also works in OpenBSD's csh.  The
> > `time' variable accepts format flags.
> > compare:
> > set time=0
> > sleep 1
> > with:
> > set time=(0 %E)
> > sleep 1
> > The source:
> > > case 'E': /* elapsed (wall-clock) time */
> > https://cvsweb.openbsd.org/src/bin/csh/time.c?rev=1.17&content-type=text/x-cvsweb-markup

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic