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=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 9649 invoked from network); 12 Aug 2021 16:05:54 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 12 Aug 2021 16:05:54 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1628784354; b=eU8D4XTOx5pIYbHPUsbNqrMyqcNrCbYtL6VUg//F5gZp9sZOn0wKwcnsxqryJ1ATgjjkTbJ6Kw WJsdEaffVXIV8vFJ9RycBtCZlPbmVnazXV1N6tCMbL+MkW5saSwRNwAi/lBHelpWz0ZRku/epk rm6vsoGfmPyiV9LxIsC1IBpl31QH6tyt9f9StLr0cw26rXyiHmHjkcpk+kxB8Ys7ODAdktX1Dt /ePy8wNRVG1LVuSQOoscsU3nLoqka4nGGpPL4u5xIrxcAA95a65l8wRfnbrFjhu1IE0+x0hf6F 6Cyr0HEkIAWTUtQ/qJzUunpfAOOu1ZzzkOpsGFIIy5xBWg==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (granite.fifsource.com) smtp.remote-ip=173.255.216.206; dmarc=none header.from=fifi.org; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1628784354; bh=mN/di5lnZaX2Hj3+F6m+Trze44LWjbRVHFcXh+8mafc=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Transfer-Encoding:MIME-Version:Content-Type: References:In-Reply-To:Date:To:From:Subject:Message-ID:DKIM-Signature; b=Z2QoatsQgU73Kq2yFdrk0N7LOO5gkLrrzK7gZtVGjEM6hvh9iKlMladvy7BBHJt2d72L/S3+KA 1ZFU2o0VskjFvuuktAs4/iGGNMVG91Gi533+rjOEbrz8Vx0y+SV4W6Hb28UT1PZiEiHgT38qOj XCKWhRdOVwGngZM30VfQcB9zJZwlEt/DNPWW8TIteaUsWeGR3CWf/wAb8uYpkYHCdjttMIwLT5 a3euAqvA6cSy7LcrFyOlXfU8EyzFhsFdxLUh9yVFgDSnUuaGxUVu9PaafoZrkmVXfbA4g5y0ZJ 42QmQKVyDGHkOjK83jBuXX9OtwMRNgBoAxyr5aH1ssewiw==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20210803; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-Transfer-Encoding: MIME-Version:Content-Type:References:In-Reply-To:Date:To:From:Subject: Message-ID:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From :Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=86APJy8t1VmiZoaIiH2Muc+kjBV9yBa4a6N3KA0RQhg=; b=VoafxaC9Y+BU7zKolHAsZuLz9G SoqndDppXLXqaRE6GoENHBpBkIrYBgWWBYIjS5YlWfH8FHUeqFNoksXyEr9j/f3qCm4kvyJ9pHw5A ZShhamU0tgoZUtvoGafJCVBSpPxWWg3gCHUOrdMTrgersTxv2vePW5U0KzKDtD/sZ5sNAxUyEaDmp RIWm+kyZowS6mm4vH5RUAi0eyx6oEgShlNqxrn2Kc0D4gy2KT1dK2hKucPPXPY4AnLkPNF+c+DkjR 8Ut62e98JeqKEYPq+/iTy/mSeFsM6aYrP5NnYQnEAvdhP7qO+WWyD9ews6v3lIgWsAtcvmyEuIJwf qCeWinxw==; Received: from authenticated user by zero.zsh.org with local id 1mEDDM-000BXY-8T; Thu, 12 Aug 2021 16:05:52 +0000 Authentication-Results: zsh.org; iprev=pass (granite.fifsource.com) smtp.remote-ip=173.255.216.206; dmarc=none header.from=fifi.org; arc=none Received: from granite.fifsource.com ([173.255.216.206]:40342) by zero.zsh.org with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) id 1mEDCW-000Anf-Ex; Thu, 12 Aug 2021 16:05:01 +0000 Received: from ceramic.fifi.org (107-142-44-66.lightspeed.sntcca.sbcglobal.net [107.142.44.66]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by granite.fifsource.com (Postfix) with ESMTPSA id 34EB84073 for ; Thu, 12 Aug 2021 09:04:58 -0700 (PDT) Message-ID: Subject: Re: Re-loading files loaded via "autoload" From: Philippe Troin To: Zsh Users Date: Thu, 12 Aug 2021 09:04:57 -0700 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.38.4 (3.38.4-1.fc33) MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Seq: 26928 Archived-At: X-Loop: zsh-users@zsh.org Errors-To: zsh-users-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-users-request@zsh.org X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: On Wed, 2021-08-11 at 20:25 +0200, Mikael Magnusson wrote: > eg, we have this, which mentions it in a comment of the example code: >        It is also possible to create a function that is not marked > as autoloaded, >        but which loads its own definition by searching fpath, by using > `autoload -X' >        within a shell function. For example, the following are equivalent: > >               myfunc() { >                 autoload -X >               } >               myfunc args... > >        and > >               unfunction myfunc # if myfunc was defined >               autoload myfunc >               myfunc args... I use this function as a convenience when I work on autoloaded functions: autoreload () { emulate -L zsh local i for i in $@ do (( $+functions[$i] )) && unfunction $i autoload -U $i done } Phil.