From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from primenet.com.au (ns1.primenet.com.au [203.24.36.2]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id f695c378 for ; Thu, 14 Nov 2019 01:16:20 +0000 (UTC) Received: (qmail 9813 invoked by alias); 14 Nov 2019 01:16:13 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: List-Unsubscribe: X-Seq: 24427 Received: (qmail 3982 invoked by uid 1010); 14 Nov 2019 01:16:13 -0000 X-Qmail-Scanner-Diagnostics: from mail-wm1-f47.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.102.0/25628. spamassassin: 3.4.2. Clear:RC:0(209.85.128.47):SA:0(-2.0/5.0):. Processed in 1.043525 secs); 14 Nov 2019 01:16:13 -0000 X-Envelope-From: robobenklein@gmail.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _netblocks.google.com designates 209.85.128.47 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=m+2QZ3Vqm8oKBOfK/Vp5I/WzNuy2znkPWs/DbmcSEIQ=; b=Yr48W11Xj+Betu76Z+xDxNMb/BI7ag4oZF0twTiEkf7XiYKx4Aoz50BmF21elyizt9 pY+Y9jEWGw3QYHT6kxOG8H0/aCClf6/4F3qDpNkYfHHG7HK1TiNc8NigBGULd9x+ZERE pxzqpYSPQ2TF04M9gWv9RTHZ+JJ4FYcuH/8/m/B00gowtofa4CXHz4B6IJBhZWyFvV99 /MldFVex0hHs847b4SQCFZ0I0K3swnnJw4BKaG9fnSlYjqmSWYpQo9d9M9RLTwmu1H8E Kkqd7nLc7xTTNehx4cFTg91TCTfnzEbp8leIcFzQibxHl4Slz+3Cw9LDfuwBglXV44Wi WqWg== 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+2QZ3Vqm8oKBOfK/Vp5I/WzNuy2znkPWs/DbmcSEIQ=; b=fWsrl1pG8uKWFRHKfdeTyooQmu0yBGZugNeIYcYyQBn95KoVrUTbRc5+o51/JPfYwY g9X8rJwN7A+ivg4wGhclCpq/UbV7DBL/fur0RXxTPI2oSEpr0IukPG9r5ZegquIosjVI DlsDWdAidHmB3b87GH19BRUrg1yni9P0M7WjMq/B6OLKhzEl9SHWEiRhvAjcgLzrY+5k kRB1s05YnK1JvaCgBQzdUSUbPoaKtKgyy4jCFp7NMDHepHxC4GhnFAG+CRyDbjBMOJZb dbUyydn8pohGpSfmJ/nRZpS3MqNdi1lw27INHo9Se4lbZYO7DkKxDVU526AXT8/2+mZj eJLQ== X-Gm-Message-State: APjAAAUskmfCwF1BL2c4Zvp5twz7VvsfrYW79PlVKL2Z64SbU3oYItEd pK+to429ToChT3uNHYYopv04xOSdKW8bP0HeMeh1BMKfBSI= X-Google-Smtp-Source: APXvYqzROhW8w5vq763iwvP+0ihzQIJgpLeCLiXTE7YvDNwIIWyOUqo8lLllzzc4k/SXzdDzli53O7qtLN9IqAg60xA= X-Received: by 2002:a1c:6a0d:: with SMTP id f13mr5569334wmc.164.1573694137909; Wed, 13 Nov 2019 17:15:37 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Ben Klein Date: Wed, 13 Nov 2019 20:15:26 -0500 Message-ID: Subject: Re: Change interactive command into a comment To: Perry Smith Cc: zsh-users Content-Type: multipart/alternative; boundary="000000000000134a10059744386e" --000000000000134a10059744386e Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable The answer to that (assuming extended_glob) is way at the bottom of the Expansion docs: http://zsh.sourceforge.net/Doc/Release/Expansion.html#Filename-Generation To quote directly: x# (Requires EXTENDED_GLOB to be set.) Matches zero or more occurrences of the pattern x. This operator has high precedence; =E2=80=9812#=E2=80=99 is equi= valent to =E2=80=981(2#)=E2=80=99, rather than =E2=80=98(12)#=E2=80=99. It is an erro= r for an unquoted =E2=80=98#=E2=80=99 to follow something which cannot be repeated; this includes an empty string, a pattern already followed by =E2=80=98##=E2=80=99, or parentheses when part = of a KSH_GLOB pattern (for example, =E2=80=98!(foo)#=E2=80=99 is invalid and must be repl= aced by =E2=80=98*(!(foo))=E2=80=99). x## (Requires EXTENDED_GLOB to be set.) Matches one or more occurrences of the pattern x. This operator has high precedence; =E2=80=9812##=E2=80=99 is equ= ivalent to =E2=80=981(2##)=E2=80=99, rather than =E2=80=98(12)##=E2=80=99. No more tha= n two active =E2=80=98#=E2=80=99 characters may appear together. (Note the potential clash with glob qualifiers in the form =E2=80=981(2##)=E2=80=99 which should therefore be avoided.) *\Ben Klein* About: https://unhexium.net/about/ Other places online: https://unhexium.net/ll/ Contact me securely: https://keybase.io/robobenklein On Wed, Nov 13, 2019 at 7:25 PM Perry Smith wrote: > With bash, I got into the following habit. If I started typing a long > command and then decided I didn=E2=80=99t want to execute it right now fo= r some > reason, I would hit control-A to get back to the start of the line and th= en > add a # in front and hit return. > > This would put the command into history and so later I could recall it, > remove the #, and execute the command. > > With zsh, when I add the # to the front and hit return I get: > > zsh: bad pattern: # > > I found INTERACTIVE_COMMENTS but now I=E2=80=99m curious, what is zsh try= ing to do > with a line starting with # ? e.g. # echo dog > > --000000000000134a10059744386e--