Rocksolid Light

Welcome to Rocksolid Light

mail  files  register  newsreader  groups  login

Message-ID:  

Oh, I've seen copies [of Linux Journal] around the terminal room at The Labs. -- Dennis Ritchie


devel / comp.unix.shell / Bash reverse-i-search oddity

SubjectAuthor
* Bash reverse-i-search oddityOttavio Caruso
+- Bash reverse-i-search oddityBen Bacarisse
+- Bash reverse-i-search oddityKeith Thompson
`- Bash reverse-i-search oddityRoger

1
Bash reverse-i-search oddity

<ub2i9u$bth6$1@dont-email.me>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=6558&group=comp.unix.shell#6558

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED.46.233.82.248!not-for-mail
From: ottavio2006-usenet2012@yahoo.com (Ottavio Caruso)
Newsgroups: comp.unix.shell
Subject: Bash reverse-i-search oddity
Date: Thu, 10 Aug 2023 11:39:42 +0000
Organization: A noiseless patient Spider
Message-ID: <ub2i9u$bth6$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 10 Aug 2023 11:39:43 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="46.233.82.248";
logging-data="390694"; mail-complaints-to="abuse@eternal-september.org"
User-Agent: Mozilla/5.0 (Windows NT 10.0; rv:102.0) Gecko/20100101
Firefox/102.0
Content-Language: en-GB
X-No-Archive: Yes
 by: Ottavio Caruso - Thu, 10 Aug 2023 11:39 UTC

I have two files in two locations:

$ grep housing .bash_history |sort |uniq
vim Tenancy-Feb-2021/housing-log.txt
vim Tenancy-Jul-2023/housing.txt

As you can see, both are in the history file.

However if I do:

"CTRL-R hous"

this will only find "Tenancy-Feb-2021/housing-log.txt" but not
"Tenancy-Jul-2023/housing.txt"

This has been happening since I created the latter file
"Tenancy-Jul-2023/housing.txt".

Odd, isn't it?

--
Ottavio Caruso

Re: Bash reverse-i-search oddity

<871qgaemik.fsf@bsb.me.uk>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=6559&group=comp.unix.shell#6559

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: ben.usenet@bsb.me.uk (Ben Bacarisse)
Newsgroups: comp.unix.shell
Subject: Re: Bash reverse-i-search oddity
Date: Thu, 10 Aug 2023 20:16:19 +0100
Organization: A noiseless patient Spider
Lines: 41
Message-ID: <871qgaemik.fsf@bsb.me.uk>
References: <ub2i9u$bth6$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: dont-email.me; posting-host="1e9312cf9931c060dc623a19d6d4488d";
logging-data="515971"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18IjvxyMSRJZlXKwPhOxnsX2aLtOFI37kg="
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)
Cancel-Lock: sha1:OsRBDBYBmia2qLZj2/c4CgMhlrU=
sha1:2haqUU/myk7QCzRj+av1y/9gq14=
X-BSB-Auth: 1.a74bfda309ed9a1ed489.20230810201619BST.871qgaemik.fsf@bsb.me.uk
 by: Ben Bacarisse - Thu, 10 Aug 2023 19:16 UTC

Ottavio Caruso <ottavio2006-usenet2012@yahoo.com> writes:

> I have two files in two locations:
>
> $ grep housing .bash_history |sort |uniq
> vim Tenancy-Feb-2021/housing-log.txt
> vim Tenancy-Jul-2023/housing.txt

This hides some information that might be useful such as the order of
the commands.

> As you can see, both are in the history file.
>
> However if I do:
>
> "CTRL-R hous"
>
> this will only find "Tenancy-Feb-2021/housing-log.txt" but not
> "Tenancy-Jul-2023/housing.txt"

You mean that it finds "vim Tenancy-Feb-2021/housing-log.txt"?
I.e. that this line shows up:

(reverse-i-search)`hous': vim Tenancy-Feb-2021/housing-log.txt

And by not finding the other you mean that an immediate second Ctrl^R
press causes the above line to change to

(failed reverse-i-search)`hous': vim Tenancy-Feb-2021/housing-log.txt

immediately?

> This has been happening since I created the latter file
> "Tenancy-Jul-2023/housing.txt".
>
> Odd, isn't it?

Yes, that is odd.

--
Ben.

Re: Bash reverse-i-search oddity

<87bkfeofhj.fsf@nosuchdomain.example.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=6560&group=comp.unix.shell#6560

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Keith.S.Thompson+u@gmail.com (Keith Thompson)
Newsgroups: comp.unix.shell
Subject: Re: Bash reverse-i-search oddity
Date: Thu, 10 Aug 2023 12:38:00 -0700
Organization: None to speak of
Lines: 34
Message-ID: <87bkfeofhj.fsf@nosuchdomain.example.com>
References: <ub2i9u$bth6$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: dont-email.me; posting-host="3a0de613658644d41637a8541b5dc8f2";
logging-data="520802"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX187tsXH0k1cJEtIoQNFgP4A"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Cancel-Lock: sha1:CmHyjNne4IDwy+NZu2sdViW9Q4A=
sha1:UvKDG/mV996sctmtey12SjHCMlY=
 by: Keith Thompson - Thu, 10 Aug 2023 19:38 UTC

Ottavio Caruso <ottavio2006-usenet2012@yahoo.com> writes:
> I have two files in two locations:
>
> $ grep housing .bash_history |sort |uniq
> vim Tenancy-Feb-2021/housing-log.txt
> vim Tenancy-Jul-2023/housing.txt
>
>
> As you can see, both are in the history file.
>
> However if I do:
>
> "CTRL-R hous"
>
> this will only find "Tenancy-Feb-2021/housing-log.txt" but not
> "Tenancy-Jul-2023/housing.txt"
>
> This has been happening since I created the latter file
> "Tenancy-Jul-2023/housing.txt".
>
> Odd, isn't it?

I can't reproduce it on my system (Ubuntu, bash 5.2.0(11)-release).

Does "history | grep housing | sort | uniq" show both commands? Perhaps
your shell's internal history doesn't match the contents of the
..bash_history file. Is $HISTFILE set correctly?

(BTW, "sort | uniq" can be replaced by "sort -u".)

--
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
Will write code for food.
void Void(void) { Void(); } /* The recursive call of the void */

Re: Bash reverse-i-search oddity

<nhkmditn51quq9h350nhkkq9c5bv8k7vfo@4ax.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=6561&group=comp.unix.shell#6561

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!feeder.usenetexpress.com!tr3.iad1.usenetexpress.com!69.80.99.23.MISMATCH!Xl.tags.giganews.com!local-2.nntp.ord.giganews.com!nntp.brightview.co.uk!news.brightview.co.uk.POSTED!not-for-mail
NNTP-Posting-Date: Tue, 15 Aug 2023 10:47:24 +0000
From: invalid@invalid.invalid (Roger)
Newsgroups: comp.unix.shell
Subject: Re: Bash reverse-i-search oddity
Date: Tue, 15 Aug 2023 11:47:23 +0100
Message-ID: <nhkmditn51quq9h350nhkkq9c5bv8k7vfo@4ax.com>
References: <ub2i9u$bth6$1@dont-email.me>
X-Newsreader: Forte Agent 6.00/32.1186
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 32
X-Usenet-Provider: http://www.giganews.com
X-Trace: sv3-FrgXQcq8LsWFiqgSolm/yaJCiGh1j+WC5a+V7azbQr4qeIJzTkdZaLZCmYXI3XThdAnv3ZYeiF2qaeH!Iy1lQrptjUxioyaUl7E8hTNUa7G97VlYEjzqyw1ZcJhkUog7A0jmzoCLaSlEbF+VKrS3CDHzRaFI!4Vy9LG8UfjbIEEjG
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly
X-Postfilter: 1.3.40
 by: Roger - Tue, 15 Aug 2023 10:47 UTC

On Thu, 10 Aug 2023 11:39:42 +0000, Ottavio Caruso
<ottavio2006-usenet2012@yahoo.com> wrote:

>I have two files in two locations:
>
>$ grep housing .bash_history |sort |uniq
>vim Tenancy-Feb-2021/housing-log.txt
>vim Tenancy-Jul-2023/housing.txt
>
>
>As you can see, both are in the history file.
>
>However if I do:
>
>"CTRL-R hous"
>
>this will only find "Tenancy-Feb-2021/housing-log.txt" but not
>"Tenancy-Jul-2023/housing.txt"
>
>This has been happening since I created the latter file
>"Tenancy-Jul-2023/housing.txt".
>
>Odd, isn't it?

Odd? Yes. Try:

"CTRL-R vim T"

repeated CTRL-R will get you all instances in history which
begin "vim T". Is that any use to you?
--
Roger

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor