Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 29 Oct 2017 13:19:29 -0700
From:      Eitan Adler <eadler@freebsd.org>
To:        Devin Teske <devin@shxd.cx>
Cc:        Cy Schubert <Cy.Schubert@komquats.com>, Warner Losh <imp@bsdimp.com>,  Ed Maste <emaste@freebsd.org>,  "src-committers@freebsd.org" <src-committers@freebsd.org>,  "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>,  "svn-src-head@freebsd.org" <svn-src-head@freebsd.org>
Subject:   Re: svn commit: r325092 - head/usr.bin/fortune/datfiles
Message-ID:  <CAF6rxgneFEDkuXruKRw9RhmN%2Bi4Yoa4=MNk8qNCpR2Ro3YtBuA@mail.gmail.com>
In-Reply-To: <B855A05D-E1BB-485F-AB8D-9F9656F531CC@shxd.cx>
References:  <201710291851.v9TIpM0I073542@slippy.cwsent.com> <B855A05D-E1BB-485F-AB8D-9F9656F531CC@shxd.cx>

next in thread | previous in thread | raw e-mail | index | archive | help
On 29 October 2017 at 12:47, Devin Teske <devin@shxd.cx> wrote:

>>>>
>>>> I doubt many people use /bin/sh as an interactive shell, but the tip
>>>> ought not lead those who do astray

Will fix.

>>>
>>> Yes. /bin/sh on FreeBSD doesn't grok it, though bash and some other she=
lls
>>> available as ports do. I think that the old text was a bit better.

< snip lots of great advice>

Lets add new tips to fortune!

> I=E2=80=99ve still had to use rehash on several occasions for it to detec=
t new apps, so remove that reference might be a mistake

After r234823 I expect this to only occur if you install a new binary,
with the same as an existing hashed binary, earlier in the PATH. Have
you found this not to be the case?

--=20
Eitan Adler
Source, Ports, Doc committer
Bugmeister, Ports Security teams

On 29 October 2017 at 12:47, Devin Teske <devin@shxd.cx> wrote:
>
>> On Oct 29, 2017, at 11:51 AM, Cy Schubert <Cy.Schubert@komquats.com> wro=
te:
>>
>> In message <CANCZdfrE1oHqoTFFagVz3xHbK-oiFrPy3+rtF2cOjpzu=3DevhQg@mail.g=
mail.c
>> om>
>> , Warner Losh writes:
>>> --94eb2c114c9a7c3c21055cb3566c
>>> Content-Type: text/plain; charset=3D"UTF-8"
>>>
>>>>> On Sun, Oct 29, 2017 at 8:26 AM, Ed Maste <emaste@freebsd.org> wrote:
>>>>>
>>>>> On 29 October 2017 at 00:53, Eitan Adler <eadler@freebsd.org> wrote:
>>>>> Author: eadler
>>>>> Date: Sun Oct 29 04:53:33 2017
>>>>> New Revision: 325092
>>>>> URL: https://svnweb.freebsd.org/changeset/base/325092
>>>>>
>>>>> Log:
>>>>> Modernize freebsd-tips a bit
>>>> ...
>>>>> %
>>>>> Want to run the same command again?
>>>>> -In tcsh you can type "!!".
>>>>> +Type "!!".
>>>>> %
>>>>
>>>> $ !!
>>>> sh: !!: not found
>>>>
>>>> I doubt many people use /bin/sh as an interactive shell, but the tip
>>>> ought not lead those who do astray
>>>
>>> Yes. /bin/sh on FreeBSD doesn't grok it, though bash and some other she=
lls
>>> available as ports do. I think that the old text was a bit better.
>>
>> Or better yet, ctrl-r in bash and zsh, or up-arrow in tcsh.
>
> Since we are responding to emaste's astute observation with random person=
al favorites when it comes to history actions in an interactive shell...
>
> How about Esc-P and Esc-N?
>
> Never used it, you say? Few people do.
>
> Try this:
>
> Esc-P
> (a colon appears)
> (type a portion of the event you are looking for and press ENTER)
> Found it? Good.
> Didn't find it? Esc-P then ENTER to repeat search further back.
> Keep typing Esc-P, ENTER until you find it.
> Oh, you went too far? Esc-N, ENTER to search forward from the last matche=
d event.
>
> Sometimes I show this to co-workers and they shake their head and go back=
 to Ctrl-R.
>
> Ctrl-R is ok, but doesn't enable an Esc-N-like functionality by default. =
But if you execute (or put in your shell profile) "stty -ixon" then you can=
 use Ctrl-S to reverse the search order during a Ctrl-R search.
>
> For example:
>
> Ctrl-r
> (a prompt appears)
> (type some text; don't hit ENTER)
> Ctrl-r until you find the one you want
> Went too far?
> Ctrl-s to switch from reverse-search to forward-search
> Ctrl-s until you find one you want
>
> Just thought I would share this random info.
>
> As for the fortune statement...
>
> I agree with emaste, "Type !!" is misleading. Old statement of "in tcsh y=
ou can type !!" was fine because tcsh is the only shell in base that suppor=
ts that feature. However, possible alternatives to "Type !!" could be:
>
> Try "!!" (works in many shells but not all).
>
> NB: Trying to make a future-proof statement so the fortune datfile doesn'=
t have to be onerously maintained.
> --
> Devin



--=20
Eitan Adler
Source, Ports, Doc committer
Bugmeister, Ports Security teams



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAF6rxgneFEDkuXruKRw9RhmN%2Bi4Yoa4=MNk8qNCpR2Ro3YtBuA>