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,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 93e84a9e for ; Wed, 30 Jan 2019 17:46:37 +0000 (UTC) Received: (qmail 16460 invoked by alias); 30 Jan 2019 17:46:21 -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: 44026 Received: (qmail 8052 invoked by uid 1010); 30 Jan 2019 17:46:21 -0000 X-Qmail-Scanner-Diagnostics: from mail-lf1-f45.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.100.2/25112. spamassassin: 3.4.2. Clear:RC:0(209.85.167.45):SA:0(-17.5/5.0):. Processed in 1.723531 secs); 30 Jan 2019 17:46:21 -0000 X-Envelope-From: mgild@google.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=o4p2vt6FwCSMJ2CCAJ8McdGb481tOH0Bi4FWZNeKE2g=; b=qBkwvsqL1qwM9q/FcVlVBkEakAKMl1BJAv3tc6TsRWYGoEbQ+PPiySHM1hzYelkHZL +g4Hy1+uXPZjGEnVG8aEHtFsm58+nmwR2rjCjsSWbUQ19jZCgmcpZqfCY4TO5W1qFGpn ztGhklDRNrfMoTy3apP9HrDW/d/bHxLpC26GuJpbOn1SJkQ4Ck0eD9iivsyyxxmPu1Zg 4HP/JM0pmodq98reRQnHpSFHo+FMPchRGtsTKTPL5+iVabExU/w2tTDuLWpnnHUtqdFh l3C6fkwDnwuGx8dukNX3sNxIFzGU1sPaVlnsS2Jhx+/H3P8oE/YQQyEuQjHl9iKxKVlb zqSQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=o4p2vt6FwCSMJ2CCAJ8McdGb481tOH0Bi4FWZNeKE2g=; b=RsYWQSHjoBvJ7rs/H3AJubklQdMihl2+ywjtz1kKegTZ38n37WhYggn2V3toPiO34g m9TZvmxt6mL0Ihu+E+nH0YXk4uBVIjIwQz/q+69whyDtsUKkIa0HClLfAMmW47L3z5MG SlA7m0S3X0v3kWWtxvk0psqmfnm5tIgBi5yVfTO1i3WER4X25LrsE/JADkAkI2hRKekD irXs2SgeImZisRm8z3eqcEV+jltRzCqsj6IyAiVfykYcKhidWWmOgp5WHNIa1DGrwhAw LsoYTPO1K2fntyl+mp91W5PPlTcsnvAmgW/s0bRn5dI8E9KT/jNXv1yoQdkYRh34jevH 8gIg== X-Gm-Message-State: AJcUukf4JclNnzutpq6CwR5yy1hhv9mRQx4mOZmXROWKqYvS9hbUB5Et qi5p/HqHCvAA1U6qQgNsvyhxlx7K6Xj+2ZC2fl+TNX0GCSY= X-Google-Smtp-Source: ALg8bN5Yxtli9UL7A/n/EAJFopx5mXECEZCNXOHFQkCpoDulBFPsMZ8tJn23Jd0/cxHYkobJaH4eMEzu/0ahMgTYzA8= X-Received: by 2002:a19:1bd2:: with SMTP id b201mr24272851lfb.136.1548870373951; Wed, 30 Jan 2019 09:46:13 -0800 (PST) MIME-Version: 1.0 From: Mitchell Gildenberg Date: Wed, 30 Jan 2019 09:46:02 -0800 Message-ID: Subject: zsh function declaration bug To: zsh-workers@zsh.org Content-Type: multipart/alternative; boundary="00000000000071e03f0580b07c23" --00000000000071e03f0580b07c23 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hello, I noticed some interesting behavior when declaring zsh functions without specifying the `function` keyword. When I declare a function that is a prefix of some other item in my path or another alias, the function that is a prefix is called instead. For example: ------------ (macbook) =E2=9E=9C mgild $ zsh --version zsh 5.3 (x86_64-apple-darwin17.0) (macbook) =E2=9E=9C mgild $ ls Applications/ Desktop/ Documents/ Downloads/ Library/ Movies/ Music/ Pictures/ Public/ (macbook) =E2=9E=9C mgild $ l(){echo "hello"} (macbook) =E2=9E=9C mgild $ ls hello (macbook) =E2=9E=9C mgild $ -------------- (zsh 5.5 exhibits different behavior) =E2=9E=9C mgild $ zsh --version zsh 5.5 (x86_64-debian-linux-gnu) =E2=9E=9C mgild $ ls Desktop Documents =E2=9E=9C mgild $ l(){ echo "hello"} zsh: defining function based on alias `ls' zsh: parse error near `()' -------------- zsh 5.5 seems to exhibit different behavior, but it is still unexpectedly failing to create the function. Let me know if any more information is required. Thank you. Mitchell Gildenberg mgild@google.com --00000000000071e03f0580b07c23--