From owner-svn-src-all@freebsd.org Sun Oct 29 19:48:01 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AD5DDE4AFE9; Sun, 29 Oct 2017 19:48:01 +0000 (UTC) (envelope-from devin@shxd.cx) Received: from shxd.cx (mail.shxd.cx [64.201.244.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9DAE9646D1; Sun, 29 Oct 2017 19:48:01 +0000 (UTC) (envelope-from devin@shxd.cx) Received: from [64.201.244.132] (port=53895 helo=[10.0.0.105]) by shxd.cx with esmtps (TLSv1:AES256-SHA:256) (Exim 4.77 (FreeBSD)) (envelope-from ) id 1e8rgF-0003a0-Sy; Sun, 29 Oct 2017 17:47:27 +0000 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (1.0) Subject: Re: svn commit: r325092 - head/usr.bin/fortune/datfiles From: Devin Teske X-Mailer: iPhone Mail (13G36) In-Reply-To: <201710291851.v9TIpM0I073542@slippy.cwsent.com> Date: Sun, 29 Oct 2017 12:47:59 -0700 Cc: Warner Losh , Ed Maste , Eitan Adler , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: References: <201710291851.v9TIpM0I073542@slippy.cwsent.com> To: Cy Schubert X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Oct 2017 19:48:01 -0000 > On Oct 29, 2017, at 11:51 AM, Cy Schubert wrote= : >=20 > In message om> > , Warner Losh writes: >> --94eb2c114c9a7c3c21055cb3566c >> Content-Type: text/plain; charset=3D"UTF-8" >>=20 >>>> On Sun, Oct 29, 2017 at 8:26 AM, Ed Maste wrote: >>>>=20 >>>> On 29 October 2017 at 00:53, Eitan Adler wrote: >>>> Author: eadler >>>> Date: Sun Oct 29 04:53:33 2017 >>>> New Revision: 325092 >>>> URL: https://svnweb.freebsd.org/changeset/base/325092 >>>>=20 >>>> Log: >>>> Modernize freebsd-tips a bit >>> ... >>>> % >>>> Want to run the same command again? >>>> -In tcsh you can type "!!". >>>> +Type "!!". >>>> % >>>=20 >>> $ !! >>> sh: !!: not found >>>=20 >>> I doubt many people use /bin/sh as an interactive shell, but the tip >>> ought not lead those who do astray >>=20 >> Yes. /bin/sh on FreeBSD doesn't grok it, though bash and some other shell= s >> available as ports do. I think that the old text was a bit better. >=20 > 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 personal f= avorites 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 matched e= vent. 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 you c= an type !!" was fine because tcsh is the only shell in base that supports th= at 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 h= ave to be onerously maintained. --=20 Devin=