Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:114452 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 63705 invoked from network); 12 May 2021 16:13:28 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 12 May 2021 16:13:28 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 0F75E18050A for ; Wed, 12 May 2021 09:21:32 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from mail-yb1-f169.google.com (mail-yb1-f169.google.com [209.85.219.169]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Wed, 12 May 2021 09:21:31 -0700 (PDT) Received: by mail-yb1-f169.google.com with SMTP id h202so31367334ybg.11 for ; Wed, 12 May 2021 09:21:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=datadoghq.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=m/EulxCDzRZRdSFJ71VgiAh33Z10Y+Sa03BD/rg0wJ0=; b=Xnh7tS61HZjyDDmnqoFCEqktKijUve5EQ9byXFRpFiO2YmBaGEwABpRhYEznYg2rWv dk1oSWvbIugScDSYgSUFXMi5SOpasVAGwEwOSuQjL19jvpZci0OtKNbQ0ojyuyZ1u+Df ilxAyzfZM/DLWy9C/lhxdwg8KNtt7KujpKs8s= 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=m/EulxCDzRZRdSFJ71VgiAh33Z10Y+Sa03BD/rg0wJ0=; b=frAqqLwpVvoiBCzjzi0/6qn3QKZOkQEejHAIKdc1vuDXdyISdMhk5sjy2JEiLq1dJW fxfBJr9yoo1c3tAxjulOiZMZAPTioagZ4BfO1hzGEXKph75QvSnsCmaFNGbJ0+ewl9BQ P8w8Fp6ouop2po4qLaBwJBZCuQiDgm2a2Tpu6PBzhxIM4PWAm9Zo6ZUNA445Aaz9cbbi 1KfIsPTeTz5NCabqmBX05fm4mScIgkbsG4EpIs7ER0Heysq4Alff+64jOFW9oDvUS464 WKTwNijJcIvY3Q0rMOK+gHW+w3LwrUjT3ulgJgTkVX+oL7V78uO9vlumPFMh0q347ilw 5YdQ== X-Gm-Message-State: AOAM5320LDCJT8MLoNhWP3eO1o9Gi3q33SONYe4gRGhi4Rq7fmobiO+H GRnKsrmghTva6w1MuPTTjXZSdF9DP+wyyfF8HINYTg== X-Google-Smtp-Source: ABdhPJxrVE8KpIm+6e+pPkX516gpzYIV4S9lfx3+1RaPn9HuqgYeyudMdWFBEhwqCs92M1rbvfKUmvb9vZ+4GmHXQLA= X-Received: by 2002:a25:c012:: with SMTP id c18mr35910042ybf.402.1620836490189; Wed, 12 May 2021 09:21:30 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Reply-To: Levi Morrison Date: Wed, 12 May 2021 10:21:19 -0600 Message-ID: To: David Gebler Cc: Nikita Popov , PHP internals Content-Type: text/plain; charset="UTF-8" Subject: Re: [PHP-DEV] Disable interactive mode (-a) if readline not available From: internals@lists.php.net ("Levi Morrison via internals") On Wed, May 12, 2021 at 10:13 AM David Gebler wrote: > > On Wed, 12 May 2021, 09:13 Nikita Popov, wrote: > > > > > I think we would be better off disabling -a completely if readline is not > > available, and exit with a helpful error message. I've opened > > https://github.com/php/php-src/pull/6976 to that effect. Does that sound > > reasonable? > > > > Regards, > > Nikita > > > > +1 for this, the shell is very useful but "interactive mode", the evidence > is clear has a tendency to confuse people. > To invert the question, would anyone have a good justification to NOT > remove interactive mode? I've never once ran `php -a` and wanted the behavior that comes if you don't have readline or libedit available. As has been mentioned, if you want that behavior run `php` without -a. There's no loss of functionality here, methinks. As long as `php -a` gives a sensible message if it wasn't built with readline or libedit that says such: The interactive shell requires libedit or readline support, which this build does not have. Run php without -a to get an interactive mode instead. Or something.