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_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 9a2ef157 for ; Thu, 15 Aug 2019 15:34:15 +0000 (UTC) Received: (qmail 5830 invoked by alias); 15 Aug 2019 15:34:06 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: List-Unsubscribe: X-Seq: 44672 Received: (qmail 19105 invoked by uid 1010); 15 Aug 2019 15:34:06 -0000 X-Qmail-Scanner-Diagnostics: from st43p00im-zteg10071901.me.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.101.2/25538. spamassassin: 3.4.2. Clear:RC:0(17.58.63.169):SA:0(-4.3/5.0):. Processed in 3.720234 secs); 15 Aug 2019 15:34:06 -0000 X-Envelope-From: whereislelouch@icloud.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at icloud.com designates 17.58.63.169 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=icloud.com; s=1a1hai; t=1565883208; bh=hCnZZ9cNvDYT7f7FI3+c2S+XPohurVtP23+/QFThmhU=; h=Content-Type:Subject:From:Date:Message-Id:To; b=eZUb5kklMYPLc22rgjMRIG04fYNYmbhN1zR150MiNhqlNuikRhDvOo2N2UiOkaJz+ 8RzqyHPYV4WbNbSMaZduNI1970moXVuOVTlNiEh2CdBjHolKq9aJsa0/Ptv5Hixu10 ggPXUP0gskczT5QbnpuMM/HkdVBT48nbva9pdqXbOwIbspkLLU4ox/6iTCmFVuFIlA /tfO++QjrfhfH0jLt83CrPYOqy9VFwKnJxRfzQwSAdtP8VbztvmivRqWWxtyZA43CU 7lkwnh/11xGc0uhhEldEWFCN7Sq6JJxRylb/9AusOqYAS+9peUWEWmNqHqIuxyO1Wi 5wiFVpCqHgmcg== Content-Type: multipart/alternative; boundary=Apple-Mail-E06DDC5E-FF22-4544-A7BC-8640E5227333 Mime-Version: 1.0 (1.0) Subject: Re: [Feature Request] Add ability to define functions as noglob From: Aryn Starr X-Mailer: iPad Mail (16F203) In-Reply-To: <89238b4d-d051-4b86-b76b-3ebb70134b09@www.fastmail.com> Date: Thu, 15 Aug 2019 20:03:21 +0430 Cc: zsh-workers@zsh.org Content-Transfer-Encoding: 7bit Message-Id: <99E84896-AC85-4643-AE83-9BAF2463D40B@icloud.com> References: <89238b4d-d051-4b86-b76b-3ebb70134b09@www.fastmail.com> To: Daniel Shahaf X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-08-15_06:,, signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 mlxscore=0 mlxlogscore=924 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1812120000 definitions=main-1908150152 --Apple-Mail-E06DDC5E-FF22-4544-A7BC-8640E5227333 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 1. Any function getting urls or math expressions (code expressions in genera= l, in fact) is much more useable with noglob. And I have quite a few of such= functions. 2. Probably an option set by oh-my-zsh is changing my which. I don=E2=80=99t= want to disable such an option, though, since I greatly benefit from it. Another point I forgot; Aliases are generally not as good as functions, sinc= e you need to define the alias before you can use it. This introduces incide= ntal complexity and a need to manage what came before what. > On Aug 15, 2019, at 7:55 PM, Daniel Shahaf wrote:= >=20 > Aryn Starr wrote on Thu, 15 Aug 2019 14:54 +00:00: >> A lot of functions need to be noglob. >=20 > Why? What's the use-case? Maybe noglob isn't the right tool for the job.= >=20 >> My current workflow is to define the function as `function sth-raw()` >> and then `alias sth=3D'noglob sth-raw'`. (I use different names so that >> I can use `which sth-raw` to easily inspect the source.) >=20 > You don't need to use different names. =C2=ABwhich foo=C2=BB would only e= xpand > =C2=ABfoo=C2=BB if it were a global alias, which in your case it isn't. >=20 >=20 --Apple-Mail-E06DDC5E-FF22-4544-A7BC-8640E5227333--