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=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 19261 invoked from network); 10 Aug 2021 19:01:13 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 10 Aug 2021 19:01:13 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1628622073; b=fjRwngCwCCpopVLnHSLIwoCF6EMMHxSYnzxZKGFRQYDk+FqYYu17wn+htcsfu7OqnZzDXHSVQr fEtBQNMoBp9jiRNztxuEnTRft9tFI/428xtNSTNacF0NpDtrkOchg97K274q+55QATrSvfadLC r9Nng3loKIV+DtRrQvgucvhM8KVYdkFMSUp/0FhiRfWrsN7fv8xJV65OE65a1O+FzY5A1n/Ue2 bn4fFfk8IIOmh7mMEwxs92fHg+vWOehYY3dOyB7Tbo/BXWh2/sh0JMVkrIW9NGGX5k2DZP/+WX t2ISIKsCHHBjUIfM3iYt0ccdX7LkGWbGri7tkg9C8MMUoA==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-yb1-f179.google.com) smtp.remote-ip=209.85.219.179; dkim=pass header.d=brasslantern-com.20150623.gappssmtp.com header.s=20150623 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1628622073; bh=aFEaZI4nU+E/hwaKX8313DSCsXlW4uwFZUO/TOFfZ+4=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Type:Cc:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:DKIM-Signature:DKIM-Signature; b=F1qAb2FfYu2HB1yCueJe3p11+7qsEUStvEu2UmehuCu7xSkHllceGcGbwn1ibaxGO3SUP4iBSd A4zYtUgygPn8uuhtitRP7E7fZLuQYqkTazQczlQSbDser+vpwwnOzKSu1hxTY/8Fv0PAj95A23 fsw5zMfJKOat/cbUmow+T7ciCJWjSGqX519D1onVxg0PeNoX0gHmQQZeo7+m10V2Gcws9qlDR3 vSxhlMItMUYmSMHvpTvDlfi9Ep/eVSiu5ZQfRoSDi9z+5qZnzFKuNw6Ak374TAZNeUjVP2eE4P xyIgEYHDxDtnvlbm4tFtwJnA8ny+p3w9pM3Eg23txxtIYg==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20210803; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-Type:Cc:To:Subject:Message-ID :Date:From:In-Reply-To:References:MIME-Version:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=C026VrWIeAsGgOWerQujbbEFMsa74RKqxR+oMB/BTtw=; b=VmA6f8YvpVbYrJ8LL8/OuRv/v9 D6hjQIp+9GWz0PXGCl19gcRrih5skHBtF66WvJTufN4Iz57pqar9DLgIT4l+5yYriIxcecKg0LTlZ KO3mNjj8OfYMfQj4ykow11M7+E7pf8kJwCoJ3wcv5ZATfbNl9YoUuOWpuypJCICHQ6UuxU+mXqwf5 PErpjnU/lymS0/nNYcXo+dLTX1H/gKayo+HN59GJli64pzAvrF7U8bzwh7hUZsrT9iYy04hAM8aiR 7PstrbmFFkVuulRDYk9nLhRNlUAaRojZ+Q1IBz4jTA9edcOqwYhPphfZxbvnMCeRHqhLzyWDR1Sn6 dcw8/tpw==; Received: from authenticated user by zero.zsh.org with local id 1mDWzw-000Gyz-L3; Tue, 10 Aug 2021 19:01:12 +0000 Authentication-Results: zsh.org; iprev=pass (mail-yb1-f179.google.com) smtp.remote-ip=209.85.219.179; dkim=pass header.d=brasslantern-com.20150623.gappssmtp.com header.s=20150623 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none Received: from mail-yb1-f179.google.com ([209.85.219.179]:34435) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1mDWyz-000GFt-Jt; Tue, 10 Aug 2021 19:00:15 +0000 Received: by mail-yb1-f179.google.com with SMTP id a93so38139262ybi.1 for ; Tue, 10 Aug 2021 12:00:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=C026VrWIeAsGgOWerQujbbEFMsa74RKqxR+oMB/BTtw=; b=GZnyvBnBpYYQMUBf5b5xZ09e976pAzQtFZQfS/CJ7oh4phmwf3xnknL51ZLfOUQ1TU AcaLnX2hr5LwfFgLYSR2mH3TQmH7TxW8QyVTV5tPwh6mGtwFeHcGfHYdYego4aliKNjR mGDydpcFuYU6LOFkx+yYRW45wFasSNV+f3pA6HgODi11hFdDwc7/VXIyRn7KcJwn/22G c41LyZ7ACCjconAtZ3feo7QQxXaFhOOpZCSFtk7ab9a1pL6F5pm4aXeljpEdUXynl6rp yAaR7OAjzP8D2+R9p35j3cW0Z4zmWKZsLCTpdj96Jh/O3BYhH4Xcq5KWi8EPnXozHS2N Q8Ng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=C026VrWIeAsGgOWerQujbbEFMsa74RKqxR+oMB/BTtw=; b=rEQqoWvQHu23wb4E2dpARSbMnrWszROy1zmFegco1YJSfW0FdZa6d8qI1sILUpAcRL GwHBKgfmMfdkmZPKzUe3FN6RLBVERiQ9aOmpR+UBUFwFkGO45F1RRbfBiNqMib/AWJi9 zflaNBjb1VJck/afnqdTVXRZw2JwD0QPA2ZJXnFuRGsZaM7NlqUTv5nCM53mMAYW5L8+ 2nrLy7V0sE/39VCD1GLQB5ni1b2PanSWERYISzzVt2lBA9Am6yxqMXTI9w2qmvaWc3ON poSD3GaTombBhlgcmEyd01uOI/hQY8x9+2MU5w0FER5QazQAkzHqRpFyXFg5YU//ojkv gwZw== X-Gm-Message-State: AOAM531efpQtn8opqc3LVsqIdkyoU2xvmpQspqxSaNJ4b4UjKjyZfxrr ukD8bix2MAVvIztv9M29aZTby7fs5NGZKDQnAzZrwg== X-Google-Smtp-Source: ABdhPJxVljIL1WnfA/6EB5vs7Ijg71frflo1Dep0bIcuk07fiz6g9SpUFJkokH1+/tdtSOJCKWgS93f0jWC2DaPWqus= X-Received: by 2002:a25:9201:: with SMTP id b1mr39512257ybo.354.1628622012531; Tue, 10 Aug 2021 12:00:12 -0700 (PDT) MIME-Version: 1.0 References: <939622201.802587.1628597522569@mail2.virginmedia.com> <1971762691.811348.1628613240923@mail2.virginmedia.com> <529da2fd-0718-847a-c939-63ce4d48b9ec@eastlink.ca> In-Reply-To: <529da2fd-0718-847a-c939-63ce4d48b9ec@eastlink.ca> From: Bart Schaefer Date: Tue, 10 Aug 2021 12:00:01 -0700 Message-ID: Subject: Re: what does 'interactive' mean? To: Ray Andrews Cc: Zsh Users Content-Type: text/plain; charset="UTF-8" X-Seq: 26897 Archived-At: X-Loop: zsh-users@zsh.org Errors-To: zsh-users-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-users-request@zsh.org X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: On Tue, Aug 10, 2021 at 9:48 AM Ray Andrews wrote: > > Just when I thought I understood it :-( So 'non-interactive' might be > interactive after all? It would take some writing skill to really > elucidate this. You're WAY over-thinking this. Computer operations are called "interactive" when they in some way respond to user input, be that via keyboard, mouse, voice command, electrodes on the skull, etc. as part of normal operation. A shell is a command interpreter. When the shell is described as "interactive", that is intended to mean that the interpreter itself responds to user input, for example by printing a prompt and waiting in between interpreted commands or when a command is incomplete. That's distinct from any of the commands executed BY the interpreter doing something similar; that is, just because you can write a script that invokes the "read" builtin with consequentially a prompt and a wait for input, doesn't make the interpreter interactive, it just makes your script interactive. There are two ways this can get muddied: (1) Shell options such as INTERACTIVE and SHIN_STDIN can be forced on at the command line, which may cause the interpreter to behave AS IF it is receiving user input even when it is not. (2) The design of the file descriptor system is such that a device that interacts with the user can be substituted for almost any other input, so the interpreter can be caused to receive user input even when it does not "expect" to behave in an interactive manner. "Interactions" such as exiting on a keyboard interrupt are a special case of this: it's not the shell but instead the interactive device (terminal) that receives the keyboard input, and translates it into a signal which is delivered by the operating system. This does NOT make for an "interactive shell". Roman is making an effort to quash the documentary imprecision when describing the cases in which the interpreter behaves (or not) as if it is receiving user input (no matter whether it actually is, or it has been forced into that behavior). There's really no useful way to explain (2) within the documentation of the shell.