From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,NICE_REPLY_A,RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 2707 invoked from network); 1 Aug 2021 23:22:00 -0000 Received: from minnie.tuhs.org (45.79.103.53) by inbox.vuxu.org with ESMTPUTF8; 1 Aug 2021 23:22:00 -0000 Received: by minnie.tuhs.org (Postfix, from userid 112) id A7F5D9CA7C; Mon, 2 Aug 2021 09:21:58 +1000 (AEST) Received: from minnie.tuhs.org (localhost [127.0.0.1]) by minnie.tuhs.org (Postfix) with ESMTP id 2C0D59CA63; Mon, 2 Aug 2021 09:21:26 +1000 (AEST) Authentication-Results: minnie.tuhs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=case.edu header.i=@case.edu header.b="74CNOtSu"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=case.edu header.i=@case.edu header.b="8mKoj+uR"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=case.edu header.i=@case.edu header.b="MaMBapTM"; dkim-atps=neutral Received: by minnie.tuhs.org (Postfix, from userid 112) id 4D2649CA63; Mon, 2 Aug 2021 09:21:23 +1000 (AEST) Received: from mpv4-2015.case.edu (mpv4-2015.CWRU.Edu [129.22.103.195]) by minnie.tuhs.org (Postfix) with ESMTPS id DE53D9CA60 for ; Mon, 2 Aug 2021 09:21:21 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=case.edu; s=smtp-primary; t=1627860082; bh=6kIpXrQFQzUc39OUEPBioNwmJcuJlhgLrO0HW+VlArQ=; h=Reply-To:Cc:Subject:To:References:From:Message-ID:Date: MIME-Version:In-Reply-To:Content-Type:Content-Transfer-Encoding; b=74CNOtSuZL3eI5bjPEicp1Qnf1P7y23eMlcs7D+nTlqHPuKZo1QygtUJy55/hw9xH1 iOCwVz4Dht+r7b946YjXYUzJcv+2hx1mRnnoF5f+awGIODFR4ExJtIz13DnRyO78T/i z9CcSBC1Njh1ArEbqXjR257a6u5afngiwb537Zu+WStLFAA0jDIY3XtNMflrbbi906Y ycLca8JV0H0n9ex5XtMfDecaRFWRKixxY8l7+jJw/hjH2eSc0GgBYaJ1l+9sDw6kEU2 LXq/TDPOGqpiqAo7b21ZdZw2guGbxtgn42mKG51JbJpRYmkkY071b+hPogsiSGlNMHZ KKGicXCQ== Received: from mpv6-2015.CWRU.Edu (EHLO mpv6-2015.case.edu) ([129.22.103.202]) by mpv4-2015.case.edu (MOS 4.4.8-GA FastPath queued) with ESMTP id BXJ36458; Sun, 01 Aug 2021 19:21:20 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=case.edu; s=smtp-primary; t=1627860080; bh=6kIpXrQFQzUc39OUEPBioNwmJcuJlhgLrO0HW+VlArQ=; h=Reply-To:Cc:Subject:To:References:From:Message-ID:Date: MIME-Version:In-Reply-To:Content-Type:Content-Transfer-Encoding; b=8mKoj+uRjPpvX+104I8TfhCkgyrWFA4Sp1QASL1gHkfFgvfaRehDx6BAptvoLkOJzH VHO4L1B4VboAr8wmiNlHCzSncdyOOqylSWiVK+IKsF1HgdjMeL84vnibppL5mUYglkI a9ERJGtngJkv3IpWEXyi6VYPiZUxvDIOAzvvnzUBfEldXkLohiOPnoC+7j5QgyhnTqF aDdoWFQ9bM7hT09TGQClGLj0ZjPIvI9xaq3XDz8e9eMktFNi34x6ZmGAuN5OqIj2iPL C9FoZmeWbBNeLM7KAtSXNdO+s599kGGMAisTgtmR48rG2/f44sA3dSTh0BN131P2wki 2lBN9zCA== Received: from mail-qk1-f198.google.com (EHLO mail-qk1-f198.google.com) ([209.85.222.198]) by mpv6-2015.case.edu (MOS 4.4.8-GA FastPath queued) with ESMTP id GJG17949; Sun, 01 Aug 2021 19:21:20 -0400 (EDT) Received: by mail-qk1-f198.google.com with SMTP id h186-20020a37b7c30000b02903b914d9e335so10824565qkf.17 for ; Sun, 01 Aug 2021 16:21:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=case.edu; s=g-case; h=reply-to:cc:subject:to:references:from:organization:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=K7ICKkcZn/2tu+zxvHUO46IS4XVZ7msUQQY7jpqiVeo=; b=MaMBapTM4Dfa7baifQoU33rz7fpwi4Eld2nGDXOtgQCbLpZn5fuDy9PLIszQt/byPr v6bKDLrmatTzOOEUFxUfBdux2uHfCx0TnI/yrGuqA++91xBTjDbUQ0rmA+KyyqFM+Zny YzoOne6Sr4GzuYmawA0+X19jCQ/BrKS2Et5EwR1YOseRyLDvymq8plbUIL22sUnLkkiq 9fbwZvV5HsQhLHbYtYFlskidFPUOk9yl2vdaocTRnIiCu/qpCy5sgnrxaSlq6LvqXPYL ybMRpyXwu+HhIE7BtPycu1ooC/SpemDQIVG5VKDL0dltdlCipFzejl3hbjUT+FzEbXan 992g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:reply-to:cc:subject:to:references:from :organization:message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=K7ICKkcZn/2tu+zxvHUO46IS4XVZ7msUQQY7jpqiVeo=; b=BWG4FaYe0hVplBMfaZn8ZXG7fBUGs0pC5+2e03G9bWtfK3bQOqSGK59z/vuezgzJVD HinaIlRfoTgkyc3WXboPnnqnIgVpLX80PJtM6+WIwJDkuLxvv9HY2HxlWxCXS9IzdbZ2 gG27YkbNpStNRqrDZMarg0RVugypX20fqWesI497w+Je7UlmLeEglX1gCpjeBKAE9SkK 1sYvZqErZUT+MNQM1+JFOiKV5REo/ZZ82r96K5MNdRJIw/ABeqqfncb5mHbmmhQZvvRE hnjiRfvqCHzwMNcnmzQqzuJftgxqHAlAeh0zjF7C0TzHQTEFtheIgzHyX4Buc+VGz0kc zEmA== X-Gm-Message-State: AOAM53340O2nUfOvd2qhiXpmChwbbKuV5qZzOQa3i5NOav9P12wJNRHE y3CLD/EpGD5jSMlVaIShdqOpeZw7WK1jFuotpobYrceIWKyGSFbdSbPAaR5RtyJqDhAswc3iB4p 2swvFuUQ6KLsHNpvV X-Received: by 2002:a05:6214:e67:: with SMTP id jz7mr11735914qvb.0.1627860079411; Sun, 01 Aug 2021 16:21:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwykeIlMJIDSqp8UWltXM7Je6qVe9jsTF4KfMiIjAmYeS6jmnwM0+PBO56JjkQrrV8qpsRA/Q== X-Received: by 2002:a05:6214:e67:: with SMTP id jz7mr11735901qvb.0.1627860079118; Sun, 01 Aug 2021 16:21:19 -0700 (PDT) Received: from ?IPv6:2603:6010:dc07:54e3:d034:380d:df07:e39b? (2603-6010-dc07-54e3-d034-380d-df07-e39b.res6.spectrum.com. [2603:6010:dc07:54e3:d034:380d:df07:e39b]) by smtp.gmail.com with ESMTPSA id f5sm4787152qka.19.2021.08.01.16.21.18 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 01 Aug 2021 16:21:18 -0700 (PDT) To: Dan Cross References: <20210731142533.69caf929@moon> <40763c2d-52ad-eb01-8bf8-85acf6fee700@case.edu> From: Chet Ramey Organization: ITS, Case Western Reserve University Message-ID: <2322d5c2-19cc-d0e9-9a62-364138b9ba58@case.edu> Date: Sun, 1 Aug 2021 19:21:16 -0400 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Mirapoint-IP-Reputation: reputation=Good-1, source=Queried, refid=tid=0001.0A742F8D.61071F8E.000A, actions=tag X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A742F20.61072C70.001D, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0, ip=0.0.0.0, so=2016-11-06 16:00:04, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 6b387da3708df4e559b5ac0476e8021c X-Mirapoint-IP-Reputation: reputation=good-1, source=Fixed, refid=n/a, actions=tag X-Junkmail-Status: score=8/80, host=mpv4-2015.case.edu X-Junkmail-PrAS-Raw: score=8/80, refid=2.7.2:2021.8.1.222115:17:8.317, ip=, rules=__YOUTUBE_RCVD, DKIM_SIGNATURE, __X_GOOGLE_DKIM_SIGNATURE, __X_GM_MESSAGE_STATE, __X_GOOGLE_SMTP_SOURCE, __HAS_REPLYTO, __HAS_CC_HDR, __MULTIPLE_RCPTS_CC_X2, __CC_NAME, __CC_NAME_DIFF_FROM_ACC, __SUBJ_REPLY, __BOUNCE_CHALLENGE_SUBJ, __BOUNCE_NDR_SUBJ_EXEMPT, __SUBJ_ALPHA_END, __TO_MALFORMED_2, __TO_NAME, __TO_NAME_DIFF_FROM_ACC, __TO_GMAIL, __HAS_REFERENCES, __REFERENCES, __HAS_FROM, FROM_EDU_TLD, __HAS_MSGID, __SANE_MSGID, DATE_TZ_NA, __USER_AGENT, __MOZILLA_USER_AGENT, __MIME_VERSION, __IN_REP_TO, __CT, __CT_TEXT_PLAIN, __CTE, __REPLYTO_SAMEAS_FROM_ADDY, __REPLYTO_SAMEAS_FROM_ACC, __FROM_DOMAIN_IN_ANY_CC2, __RCPT_DOMAIN_NOT_TO, __REPLYTO_SAMEAS_FROM_DOMAIN, __DKIM_ALIGNS_1, __DKIM_ALIGNS_2, __ANY_URI, __URI_MAILTO, __URI_WITH_PATH, __URI_ENDS_IN_SLASH, __URI_NO_WWW, __CP_MEDIA_BODY, __CP_URI_IN_BODY, __SUBJ_ALPHA_NEGATE, __URI_IN_BODY, __URI_NOT_IMG, [TRUNCATED], so=2010-03-03 19:42:08, dmn=2016-08-03-0138 Subject: Re: [TUHS] Systematic approach to command-line interfaces X-BeenThere: tuhs@minnie.tuhs.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: The Unix Heritage Society mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: chet.ramey@case.edu Cc: TUHS main list Errors-To: tuhs-bounces@minnie.tuhs.org Sender: "TUHS" On 8/1/21 5:53 PM, Dan Cross wrote: > Thanks for the useful background information on existing solutions. > > If I understood the proposal correctly, it was that the program in question > would, itself, be the generator as described above. Perhaps it was coupled > with a standard structured format for consumption by the shell, which seems > like it would be useful for this sort of expansion. Yes, it would make writing generators easier. The rest of the process would change very little: determining the word to complete, determining the command name, breaking the edit line into words for the generator, invoking the generator through the appropriate mechanism, parsing the results, and processing the matches. From the shell's perspective, it's a minor change. > Of course, the process model in TOPS-20 was very different than in Unix, > and in that system, as soon as you typed the _name_ of a command it's image > was "run up" in your process. So the interactive help system was provided > by a running instance of the program itself. What I gathered from the > proposed model was that it involvedĀ multiple invocations of the program, > but with a special option that would trigger behavior informally described > as, "here's the context I've built so far; let me know what options are > available here." I don't know that it's terribly "Unixy", but I can see how > it would be useful for interactive use. Yes. None of this is very "Unixy", but people have gotten used to being able to use capabilities like completion. When you're running interactively, running additional processes when you're performing word completion isn't particularly expensive. Again from the shell's perspective, invoking one generator that executes a program with `--shell-help' isn't that much different or more expensive -- and simpler in some ways because you don't have to save any incremental parsing state -- than executing a shell function that runs several processes, mostly command substitutions. Chet -- ``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/