From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26812 invoked by alias); 2 Jan 2018 16:57:36 -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: 42198 Received: (qmail 27266 invoked by uid 1010); 2 Jan 2018 16:57:36 -0000 X-Qmail-Scanner-Diagnostics: from mail-it0-f41.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(209.85.214.41):SA:0(-1.9/5.0):. Processed in 1.824384 secs); 02 Jan 2018 16:57:36 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_PASS,T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.1 X-Envelope-From: dana@dana.is X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dana-is.20150623.gappssmtp.com; s=20150623; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=j1+IEoa3K0CSecQDUlE/9xwW1CtHQfK1Nije60j/EhE=; b=psvI0CEygzXPaKKflLJOQgZjLGRz1Si5nJgjEkszpsij6UX3e2dSmX1UbBSeqWoUfE zeoBcZMXaHkZqlgRbGG8+wZtXg1YHL5DRw5aR82pxjrXC4a3gTccoZgIwb3vKczQCUZF SDI0fUkQs0gjdTNfloaRdnYQWw6t5JxliwsJ6zDdOk77dti+F9/9p4dlAJyatL7Es5Qk j9/kKVxOwmm3jroufsrVP4bV7ILUbgzUSbHdKWuryPFGgCskwNUl4Kz4EatnPwNcHFjA hSCM6OsPU1Z6PxPo58va8g4Uex/jORzNn9CLmMHzvkp5Lqr552Qa9mgP09guTYvm6A9X Sf6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=j1+IEoa3K0CSecQDUlE/9xwW1CtHQfK1Nije60j/EhE=; b=F+54nQb1Sk3S4mcpd687IhZQOBek035LjXXt8JQEhj6oH8LJRv4J9YmfU5k81ZEmfp 3hX6/EKNNoCKGT4wC46mlmXBpD9FnhpC1I61L0kerFLbM/zzC52Ipu4gJ85wv65Ent0a 0xVUmYkrAELv2fqXBozVuqgowSESC6mgMqpnDxG/u1ceQjRMm+5PzCX3OrRIRA3udX3q y0D2CKZXoYpr5vMBHA+bwQ8sIN2KDZ3YEZ/mJMjhYexO/jUalbO1OXT/LbdBoIQc9Okh wZf1kXloQsMeyUNYgS11Zv58VkceRrJRO2bFFi5lLMW841kg8Br3DoGflGTl6j+hk4G6 2GEw== X-Gm-Message-State: AKGB3mKcJsShp9fcA8zscqcoQJIaBd0OTguResd+l0RyAmUhL3lKk1xT LO5lCKREA0U05gJjz8yJIJQ3rhfYajM= X-Google-Smtp-Source: ACJfBoud5XCiwqPqEVDNki98/3oo9J4HJgdqdyfJRV7fdXmU2zWixm7e8SvqNCExeK2l6gKYu9RcfA== X-Received: by 10.36.178.2 with SMTP id u2mr12127779ite.127.1514912251408; Tue, 02 Jan 2018 08:57:31 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: Handling of *ARGZERO options, for Zsh <= 5.3 From: dana In-Reply-To: Date: Tue, 2 Jan 2018 10:57:26 -0600 Cc: zsh-workers@zsh.org Content-Transfer-Encoding: quoted-printable Message-Id: <786CAD82-87B3-4ECD-BFDF-99E7D4E1D5F3@dana.is> References: To: Sebastian Gniazdowski X-Mailer: Apple Mail (2.3273) On 2 Jan 2018, at 04:17, Sebastian Gniazdowski = wrote: >I want to filter out $0 value if it contains path to Zsh binary: A lot of the time you won't have the path to the zsh binary; it will = often just be the base name: % print $ZSH_ARGZERO zsh Even when you have a path you might need to deal with symlinks, &c. On = mine sometimes i'll have /usr/local/bin/zsh and other times it'll have been = resolved to /usr/local/Cellar/zsh/x.y.z/bin/zsh. On 2 Jan 2018, at 04:17, Sebastian Gniazdowski = wrote: >Above works, but for Zsh 5.3 and above. Is it possible to do this with = earlier Zshells? If the problem is ZSH_ARGZERO, shouldn't this work in like 5.0+? () { setopt local_options posix_argzero MY_ARGZERO=3D$0 } dana