Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

My sister opened a computer store in Hawaii. She sells C shells down by the seashore.


devel / comp.lang.tcl / Re: where is "!" documented for history package?

SubjectAuthor
* where is "!" documented for history package?clt.to.davebr
+- where is "!" documented for history package?Rich
+- where is "!" documented for history package?Ashok
`- where is "!" documented for history package?Schelte

1
where is "!" documented for history package?

<5131672068856@dlp>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=10475&group=comp.lang.tcl#10475

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: clt.to.d...@dfgh.net
Newsgroups: comp.lang.tcl
Subject: where is "!" documented for history package?
Date: Mon, 26 Dec 22 15:34:16 GMT
Organization: A noiseless patient Spider
Lines: 8
Message-ID: <5131672068856@dlp>
Injection-Info: reader01.eternal-september.org; posting-host="c824622c57cfd1d15dd9c5149e0f4e93";
logging-data="3477977"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18YyDBZuZUi5TwPVbO6WW6h"
Cancel-Lock: sha1:QW+qEfhXWzWn/4AAEBgW5IRx9d0=
 by: clt.to.d...@dfgh.net - Mon, 26 Dec 2022 15:34 UTC

I recently tried naming two procs "mon" and "!mon".
In most cases executing !mon on the console executed mon.
It appears this is a feature of the history package,
however I'm not finding any mention of it in the manual page.
Does anyone know where it is documented?

daveb

Re: where is "!" documented for history package?

<tocjvm$3al2q$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=10476&group=comp.lang.tcl#10476

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: ric...@example.invalid (Rich)
Newsgroups: comp.lang.tcl
Subject: Re: where is "!" documented for history package?
Date: Mon, 26 Dec 2022 17:00:38 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 21
Message-ID: <tocjvm$3al2q$1@dont-email.me>
References: <5131672068856@dlp>
Injection-Date: Mon, 26 Dec 2022 17:00:38 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="9f063f73901021ba227d5fc6eb32c4bf";
logging-data="3495002"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+DDcPCkTcI+89ccBr7d/Fy"
User-Agent: tin/2.0.1-20111224 ("Achenvoir") (UNIX) (Linux/3.10.17 (x86_64))
Cancel-Lock: sha1:P9zz4K2i5xb1BvH58lm53AqcjVo=
 by: Rich - Mon, 26 Dec 2022 17:00 UTC

clt.to.davebr@dfgh.net wrote:
> I recently tried naming two procs "mon" and "!mon".
> In most cases executing !mon on the console executed mon.
> It appears this is a feature of the history package,
> however I'm not finding any mention of it in the manual page.
> Does anyone know where it is documented?

The exclamation point for history expansion is used by GNU readline, so
if the history package is generally trying to emulate readline, that
would be where to look for documentation.

The docs for ! in the bash manpage are:

Event Designators
An event designator is a reference to a command line entry in
the history list. Unless the reference is absolute, events are
relative to the current position in the history list.

! Start a history substitution, except when followed by a
blank, newline, carriage return, = or ( (when the extglob
shell option is enabled using the shopt builtin).

Re: where is "!" documented for history package?

<todml5$3effv$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=10477&group=comp.lang.tcl#10477

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: apnmbx-p...@yahoo.com (Ashok)
Newsgroups: comp.lang.tcl
Subject: Re: where is "!" documented for history package?
Date: Tue, 27 Dec 2022 08:22:22 +0530
Organization: A noiseless patient Spider
Lines: 17
Message-ID: <todml5$3effv$1@dont-email.me>
References: <5131672068856@dlp>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 27 Dec 2022 02:52:22 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="9d5728fa17d804b1ec944849fa1dcf56";
logging-data="3620351"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+oFaywQXaZubKW5qZWVUsr"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.5.0
Cancel-Lock: sha1:XdHvgUOmIYsnVbEnHH3jWNwEdjw=
In-Reply-To: <5131672068856@dlp>
Content-Language: en-US
 by: Ashok - Tue, 27 Dec 2022 02:52 UTC

On 12/26/2022 9:04 PM, clt.to.davebr@dfgh.net wrote:
> I recently tried naming two procs "mon" and "!mon".
> In most cases executing !mon on the console executed mon.
> It appears this is a feature of the history package,
> however I'm not finding any mention of it in the manual page.
> Does anyone know where it is documented?
>
> daveb
>

Good question. I could not find it documented in the Tcl manpages either.

Of course, the Unix shell pages document it so you could use that as a
(rough) reference. Still, this tclsh feature is not Unix-specific and
should probably be documented if it isn't.

/Ashok

Re: where is "!" documented for history package?

<nnd$48a4d996$510a77e6@2ffdc2584c360913>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=10479&group=comp.lang.tcl#10479

  copy link   Newsgroups: comp.lang.tcl
Date: Tue, 27 Dec 2022 10:40:29 +0100
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.0.2
Subject: Re: where is "!" documented for history package?
Content-Language: nl-NL, en-US
Newsgroups: comp.lang.tcl
References: <5131672068856@dlp>
From: nos...@wanadoo.nl (Schelte)
In-Reply-To: <5131672068856@dlp>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Message-ID: <nnd$48a4d996$510a77e6@2ffdc2584c360913>
Organization: KPN B.V.
Path: i2pn2.org!i2pn.org!aioe.org!news.uzoreto.com!feeder.usenetexpress.com!tr3.eu1.usenetexpress.com!94.232.112.246.MISMATCH!feed.abavia.com!abe006.abavia.com!abp003.abavia.com!news.kpn.nl!not-for-mail
Lines: 21
Injection-Date: Tue, 27 Dec 2022 10:40:29 +0100
Injection-Info: news.kpn.nl; mail-complaints-to="abuse@kpn.com"
 by: Schelte - Tue, 27 Dec 2022 09:40 UTC

On 26/12/2022 16:34, clt.to.davebr@dfgh.net wrote:
> I recently tried naming two procs "mon" and "!mon".
> In most cases executing !mon on the console executed mon.
> It appears this is a feature of the history package,

This is not a feature of the history package. It is the `unknown`
command that jumps in when a command line does not match an existing
command. So the behavior is described in the unknown man page:
"First, it sees if cmd has one of the following three forms: !!, !event,
or ^old^new?^?. If so, then unknown carries out history substitution in
the same way that csh would for these constructs."

However, if you have defined a !mon proc, then that should always be
found and the `unknown` command would not be invoked. I have no
explanation for the behavior you describe.

Schelte.


devel / comp.lang.tcl / Re: where is "!" documented for history package?

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor