From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 25552 invoked from network); 23 Jun 2020 16:04:36 -0000 Received: from ns1.primenet.com.au (HELO primenet.com.au) (203.24.36.2) by inbox.vuxu.org with ESMTPUTF8; 23 Jun 2020 16:04:36 -0000 Received: (qmail 22143 invoked by alias); 23 Jun 2020 16:04:20 -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: Sender: zsh-users@zsh.org X-Seq: 24949 Received: (qmail 29022 invoked by uid 1010); 23 Jun 2020 16:04:20 -0000 X-Qmail-Scanner-Diagnostics: from mail-ot1-f53.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.102.3/25850. spamassassin: 3.4.4. Clear:RC:0(209.85.210.53):SA:0(-1.9/5.0):. Processed in 2.339137 secs); 23 Jun 2020 16:04:20 -0000 X-Envelope-From: schaefer@brasslantern.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.210.53 as permitted sender) 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:content-transfer-encoding; bh=Q4Ab0w3U5kJa+Gb147w1gryOi7pJkXnolzfEHfG+W2E=; b=O41g6Er+etVwmMOafV3m1rP8fBJh/ONhBUMXmIUxe9ZV5k+LXLc58CLVqGmgikKj5r QNjygn0/vS0WWCC5HG8vAVE6eYGgBdR8V/Vx7mFWjHn4mxXsbGE5Em/gydf+B1Ie8U8E bqgKSKFPEAxt9wQG0V0SoHnEP20TZgZivYFoNVpSeTetEo3NoV3KR5L8reM7CMllEDpO hExmrrLZ9KOkbD9iS/FJBnmuKvJ/JcBIxM97IbRQOmNdzIh4DOgRBdG/JMAZLct6gRB6 CjHLhjsDETfYYG6H1NQiruTHCbN6+lOF8Idh8UNzitzPIQzxKcYC60qr0xKQbW1uX6Wy Grzw== X-Gm-Message-State: AOAM5332kkG7sJ83eojmutv2QbqIHiW85yo33UQzekXjnRkNlO0/3gRO uDfSOTtnXZNP5AGwhO6Hw48+ip5uE4UcaPmPqHN5YJqb X-Google-Smtp-Source: ABdhPJxjwNhns4IpDZRbjA+hQa9/EUS2NzEWqBMUEf7I9PBroHslqdXqef/oiA8+Cf2gSWFf04fQH/aH/R/NmzuaoDA= X-Received: by 2002:a9d:5d11:: with SMTP id b17mr14066716oti.260.1592928223848; Tue, 23 Jun 2020 09:03:43 -0700 (PDT) MIME-Version: 1.0 References: <20200623120429.2c889b67@tarpaulin.shahaf.local2> <2982509.CQOukoFCf9@nbkamil> In-Reply-To: <2982509.CQOukoFCf9@nbkamil> From: Bart Schaefer Date: Tue, 23 Jun 2020 09:03:33 -0700 Message-ID: Subject: Re: Alias call in function fails... To: Zsh Users Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Jun 23, 2020 at 6:11 AM Kamil Dudka wrote: > > On Tuesday, June 23, 2020 2:46:50 PM CEST Perry Smith wrote: > > > > I don=E2=80=99t know of anything an alias can do that a function can=E2= =80=99t? > > % alias %=3D' ' > % alias mkdir=3D'nocorrect mkdir' > % alias zfget=3D'noglob zfget' Yes, that's one of two things alias can do that functions cannot: Give instructions to the parser. The other thing is make replacements in contexts other than the "command position" (global aliases). Both of those are intended as interactive features, though, because there are other ways to do them in scripts, where saving keystrokes and the user's memory are not important.