From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28274 invoked by alias); 13 Aug 2017 23:58:05 -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: 22819 Received: (qmail 825 invoked by uid 1010); 13 Aug 2017 23:58:05 -0000 X-Qmail-Scanner-Diagnostics: from mail-qk0-f172.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.220.172):SA:0(-2.8/5.0):. Processed in 1.648782 secs); 13 Aug 2017 23:58:05 -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=-2.8 required=5.0 tests=RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_PASS,T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.1 X-Envelope-From: schaefer@brasslantern.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=TM6/IsrOs9migKMpRRRNQmJHIC91wu8KAu50Y0nMLps=; b=UUT0F2HGqZpvnGIE4gMmaH9Ye0e4lDPh7inyxHepOSOz0HGc3S8gLyBeaIifNS6tQJ 3gnZyZsnJweFyPRDICsVf+HhNeK7v+ySJqLAe4wsM1qsbOp7VGDPcABPx74kLD6/1zMP oHstc5DGpzUAxsiy/SNSl3h5bhbWFJ1QyYkN5Z+5mhr/AlbAN21nAApMkxjmVhpdTb97 vk1shHAoQG7ZPCB0d7wysMNoo5N9prd7Oc5np+r5mZ1ef4cmjyvWWxDTD9jRNTQCXkkH veTeBfH+xsk6PV78p0P+2UtOcPP0FR5N2o7fJB/VdiFl0eY3GnWsg87J/cC1lGRAKKVY jxPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=TM6/IsrOs9migKMpRRRNQmJHIC91wu8KAu50Y0nMLps=; b=LqRnmAy2mDTQsyaA6zUV5hFhntoezPt6LaLi6MCQBho8NkaphjzgmwHpnvVcQ1Vl9r cPDIXsWTF+ifDJx74b8t/03svDYYbdu3CSbtAKiF8lQwgnEJFknyV1Qi2Kp7R0pJ142W eoR01/ZFu8gzfLCDtPIH2OnQdERxloZ6Us7N19G2Rr2nHTmYW2wo+qlVvK33e7tk3yan p2trh3pBgDjm9utD0ENAYAj9QAqpiqzXvBm6SLD1r5ifTPouDnve4quoDcfnAWhjgXp7 uONAFS8x213j8M2F5FYVtpBj4K9K/1ag/McuvSXv9QixpqEMpsOxJKjT1zDYrI3CYw/R lsDQ== X-Gm-Message-State: AHYfb5iYsexjW/8ANHj4TjhY4fmJ3r4x0hQLMUvK10n5Ryac9GsUPndk vQfLDCvYBUs01ySIP5/BVcvGmhM1pv+D X-Received: by 10.55.25.133 with SMTP id 5mr4308797qkz.232.1502668678654; Sun, 13 Aug 2017 16:57:58 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <898c3100-52e8-9450-a816-4b029f807067@zsh-users.rxv.me> References: <75edf819-b9c7-4466-978b-14331314e92a@zsh-users.rxv.me> <898c3100-52e8-9450-a816-4b029f807067@zsh-users.rxv.me> From: Bart Schaefer Date: Sun, 13 Aug 2017 16:57:57 -0700 Message-ID: Subject: Re: Shell sourced function not available to executed script To: Clint Priest Cc: Zsh Users Content-Type: text/plain; charset="UTF-8" On Sun, Aug 13, 2017 at 4:15 PM, Clint Priest wrote: > It would also seem that 'autoloaded functions' are also not available from > executed scripts... I created it as an autoloaded function and it works > from the CLI just fine. > > > On 8/13/2017 6:02 PM, Clint Priest wrote: >> >> In my case, I have a function: >> >> Which is `source`ed into my environment. This is going to depend on which of your startup files contain the "source" or "autoload" commands. Interactive and login shells load a different set of ~/.z* files than do scripts. Scripts typically read only /etc/zshenv and ~/.zshenv. For complete details, "man zsh" and read the section on "Startup/Shutdown Files" (or section 5.1 in "info zsh" if you have that available).