From: Rob Pike <robpike@gmail.com>
To: chet.ramey@case.edu
Cc: The Eunuchs Hysterical Society <tuhs@tuhs.org>
Subject: Re: [TUHS] Warner's Early Unix Presentation
Date: Sun, 9 Feb 2020 10:13:27 +1100 [thread overview]
Message-ID: <CAKzdPgxPcMTr7=6j+DwAS8nSkn+syDn=PpWW45L0jKgT38_K2g@mail.gmail.com> (raw)
In-Reply-To: <CAKzdPgwRr_U9MeoM8AHziY=EAEj48W+m+SRASda_hGwauKqysw@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1475 bytes --]
Here is rc, which absorbed most of that behavior from the v8 shell:
% rc
% fn f { echo hi }
% whatis f
fn f {echo hi}
% whatis path
path=(. /Users/r/bin /usr/local/bin /usr/bin /bin /usr/sbin /sbin
/usr/local/go/bin /Applications/Keybase.app/Contents/SharedSupport/bin
/usr/local/plan9/bin)
% rc
% # subshell
% f
hi
%
On Sun, Feb 9, 2020 at 10:11 AM Rob Pike <robpike@gmail.com> wrote:
> Not for me it doesn't.
>
> % bash
>
> bash-3.2$ function f() {
>
> echo hi
>
> }
>
> bash-3.2$ export f
>
> bash-3.2$ bash
>
> bash-3.2$ f
>
> bash-3.2$
>
>
> I added the 'builtin' command, which did leave the labs. But I added it as
> a way for the "whatis" command to show a builtin, as well as allowing a way
> to guarantee you get the builtin on execution.
>
>
> How do I get bash to print the function as (shell) source code, so I could
> edit it and play with it again? It was the synergy of all this stuff
> connected seamlessly that made it so compelling.
>
>
> -rob
>
>
>
> On Sun, Feb 9, 2020 at 10:02 AM Chet Ramey <chet.ramey@case.edu> wrote:
>
>> On 2/8/20 5:54 PM, Rob Pike wrote:
>> > Like exportable functions and output that's valid input, so it works
>> well
>> > with an editable typescript.
>>
>> Bash has both of those things.
>>
>> --
>> ``The lyf so short, the craft so long to lerne.'' - Chaucer
>> ``Ars longa, vita brevis'' - Hippocrates
>> Chet Ramey, UTech, CWRU chet@case.edu http://tiswww.cwru.edu/~chet/
>>
>
[-- Attachment #2: Type: text/html, Size: 8541 bytes --]
next prev parent reply other threads:[~2020-02-08 23:14 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-07 22:25 Warren Toomey
2020-02-07 23:57 ` Rob Pike
2020-02-08 0:43 ` Warren Toomey
2020-02-08 3:37 ` Warner Losh
2020-02-08 15:15 ` Warner Losh
2020-02-08 21:50 ` Rob Pike
2020-02-08 22:29 ` Chet Ramey
2020-02-08 22:54 ` Rob Pike
2020-02-08 23:02 ` Chet Ramey
2020-02-08 23:11 ` Rob Pike
2020-02-08 23:13 ` Rob Pike [this message]
2020-02-08 23:21 ` Kurt H Maier
2020-02-08 23:26 ` Rob Pike
2020-02-08 23:28 ` Chet Ramey
2020-02-08 23:26 ` Chet Ramey
2020-02-08 23:29 ` Rob Pike
2020-02-08 23:35 ` Warner Losh
2020-02-08 23:36 ` Chet Ramey
2020-02-08 23:54 ` Rob Pike
2020-02-09 0:11 ` Chet Ramey
2020-02-09 0:19 ` Larry McVoy
2020-02-08 22:31 ` Richard Salz
2020-02-10 13:18 ` Tony Finch
2020-02-10 15:05 ` Dan Cross
2020-02-10 15:46 ` [TUHS] V9 shell [was Re: Warner's Early Unix Presentation] arnold
2020-02-10 18:39 ` Rob Pike
2020-02-10 18:59 ` Bakul Shah
2020-02-10 19:58 ` Angelo Papenhoff
2020-02-10 20:11 ` Chet Ramey
2020-02-11 9:33 ` arnold
2020-02-11 9:47 ` Noel Hunt
2020-02-11 9:47 ` Rob Pike
2020-02-11 9:59 ` Rob Pike
2020-02-11 17:05 ` Steffen Nurpmeso
2020-02-11 17:18 ` Arthur Krewat
2020-02-11 18:22 ` Kurt H Maier
2020-02-16 21:34 ` Wesley Parish
2020-02-11 18:26 ` Jon Steinhart
2020-02-11 23:56 ` Steffen Nurpmeso
2020-02-12 0:12 ` Jon Steinhart
2020-02-12 1:03 ` [TUHS] V9 shell Warren Toomey
2020-02-12 5:54 ` [TUHS] V9 shell [was Re: Warner's Early Unix Presentation] Rob Pike
2020-02-11 17:36 ` Dan Cross
2020-02-11 18:35 ` Christopher Browne
2020-02-11 18:54 ` Rob Pike
2020-02-11 21:36 ` Harald Arnesen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAKzdPgxPcMTr7=6j+DwAS8nSkn+syDn=PpWW45L0jKgT38_K2g@mail.gmail.com' \
--to=robpike@gmail.com \
--cc=chet.ramey@case.edu \
--cc=tuhs@tuhs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).