From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24739 invoked by alias); 29 Oct 2015 23:53:25 -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: X-Seq: 20860 Received: (qmail 4881 invoked from network); 29 Oct 2015 23:53:23 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern_com.20150623.gappssmtp.com; s=20150623; h=from:message-id:date:in-reply-to:comments:references:to:subject :mime-version:content-type; bh=49gaCLA8kc+ZM5F02N0Vj0H6FaLXDjAi1EHnQMMaJu8=; b=yB3ElWYSviQARGGMBpNfeYJ4YhESmBPO8FYtHgebYt7LgxIEAcKV3+O+gqxfxGkTZz t1YLMohEmUMAw5AKUZ0XQJgbTSCV+t6VeSzblKNfYU/iseHq+e1NEKFI3lm+9iZ/pzU3 fgv+YbFifAbVPTEDkre/7EM+cLbJeO9y6oEQT4pb3sSeuW2GL8nnO6U83BLNPq6OB81h xcpSMuIU8AvFRJTxLswB5B0XWFzIqXjEo5vV0FmQmbEUrZAAhZGa7GvCNdQqXOrna5xP y7tQHLbmG88QA3XaCTl7SUSzQmyRK/FjNB3dfQjyCQ5/eE6TRbpeM9boNSz4fVMeq5pZ ReTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:message-id:date:in-reply-to:comments :references:to:subject:mime-version:content-type; bh=49gaCLA8kc+ZM5F02N0Vj0H6FaLXDjAi1EHnQMMaJu8=; b=HxPvEkU+MWZvYLokzijvx9TupsK0xT354o2bX7tJ2aP3//vx+u6rPMg8K04KSG9GkJ J3TMqebrEN9CKIIZLpdBEF2KezUTO1sAXqWaKNNriDuqWNUBfejfW+8blHgH4+EqA3RL 5MpTgIG6SYRpph1O+3HrkjwQ1/XeZJFC1FkykuRaY8fySzOQpsZIn9cxS4aOZ4SZS5lV awE7mS65kc+EjhL/FONXs4A6oP2R6qWL3cGs4CfdZkgXkCM//kzAOsFr4xTk2X9K4XBU gAVOENP3+b2zES4Ng+Yu59/l8NNtu3jRu86p7g5BSquEAkACMjfmGziRj4H794nE5gqu +D6A== X-Gm-Message-State: ALoCoQlvXUhMD84VJj4+JL5UaU5YrbgB5jtNrkWusWzY4K1vYKxoZ03PO+Yh7IubEAhnxj/IVss4 X-Received: by 10.202.86.86 with SMTP id k83mr3455775oib.68.1446162801032; Thu, 29 Oct 2015 16:53:21 -0700 (PDT) From: Bart Schaefer Message-Id: <151029165313.ZM18037@torch.brasslantern.com> Date: Thu, 29 Oct 2015 16:53:13 -0700 In-Reply-To: <56328272.40709@eastlink.ca> Comments: In reply to Ray Andrews "alias not found" (Oct 29, 1:32pm) References: <56328272.40709@eastlink.ca> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: Zsh Users Subject: Re: alias not found MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Oct 29, 1:32pm, Ray Andrews wrote: } } $ . ./navtools; type naliases; naliases } naliases is an alias for n_aliases } zsh: command not found: naliases The entire line ". ./navtools; type naliases; naliases" has already been parsed into bytecode before any of it is executed. So when navtools creates the alias, it's too late -- naliases has already been consumed and is not subject to alias replacement until another subsqeuent chunk of input is presented to the parser (effectively, not until after the next PS1 prompt is printed). This is one reason aliases are a bad idea in general. It would be much better if navtools used e.g. function naliases { n_aliases "$@" }