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=-4.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,NICE_REPLY_A,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 4538 invoked from network); 30 Aug 2021 16:41:44 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 30 Aug 2021 16:41:44 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1630341704; b=LrTZ/erZgLPnK8m6iWW2NtSfRGIf97Dmux3lugeUrQGc1SA1k6wPVoezo9AVPs7VfCdQY4KUkl 8aWRb4ar24MHn1JaKKF19NCgr+aC6r3IbOLdEMVagHBaciY9if3F345bjeNGIUhvpRmnMU32bE aNnsCaPMuHPoSnVcffGDybmfs70ZTIK3FuwNW86QjNeBbie16w1941jbUvQBhx+KxkVP/FJzV8 Ku0klpGtvAP5zsDjipLFObY55r1YE649x6+wRpyyi9jdU+6VUehntVeu1mr9sxI+BNPDxvFV6b h2sHMrAj5wc7VwpKituJKKDSILMjmZxm2pPoDX1JNtCIZA==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (wael.necoro.dev) smtp.remote-ip=92.60.36.208; dmarc=none header.from=necoro.eu; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1630341704; bh=U8UqqhoUV5nPI4mJjTjpwNBsanpcqBYHnK/pBpU9RF4=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Transfer-Encoding:Content-Type:In-Reply-To: MIME-Version:Date:Message-ID:From:References:To:Subject:DKIM-Signature; b=PuNCSKWUpOBVA4K1701Ua0IsoeEu2Rr9PfnBhRLXT/nyUa42yCwoszVYaAigpdHq2RAHAQf7i5 13uiZb/ORY6WzA7k/qqe5ePqZMH+pOWm4yUgbP5z+p9lzzk+p56mLiVtVGo/gzCZydLwUy+iVN zrdd3FQdmtn6yVs8lsswFyb2jW2cepKEsKt3UUWh0h4com6cwe9y1B6tvup3yfXnjPfzKPwIVn LYl3g3GadMrHVIAxie8glYr9C/+Z3nqq396glDw46o6Ule6PwATJjAvsXjbsolNckQ6mDTDtBa 2bmpn/U7c66QsECmFekYZqmimFGXT3UzN3ciTSXYOgipUw==; 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: Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:From:References:To: Subject:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=Mh47jnviXwYMkQ4vgPEw/ToXtgTfJI2hLhgc4I6QQck=; b=YN4lbol/KAm4rjt3qIRflWwlzn qDUoVXVby5QjvayZ+sXEtzc9hw6c2vmtGyXEWbDyURIst2IUenDxWrkmjPFxHfYEYPQf1U3IGVAjs 5hijuQNYJooOW09eIZhM0OgNeVaReXpQ5pkDvsuuD54GmQ9i1/Xg6llwCVFUxzbUdQOAx5xMkE1zA vEE/7zG/tEJCrkgCOsUTo/snxxgJ6JDv/1Wb2TXg0/Fyws2AY5K+9twbvvQDm1gQ4a3zjBECiak8k JHUWVlsD9TKCuvsCx2GYyMwsJvXe58caZd+/5xu508tBATsOG/pHeurQ8GSEolxq2DWwqMhDBK86k uhBg3IaQ==; Received: from authenticated user by zero.zsh.org with local id 1mKkLv-000CY7-Vr; Mon, 30 Aug 2021 16:41:44 +0000 Authentication-Results: zsh.org; iprev=pass (wael.necoro.dev) smtp.remote-ip=92.60.36.208; dmarc=none header.from=necoro.eu; arc=none Received: from wael.necoro.dev ([92.60.36.208]:42020) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1mKkL7-000Bpn-9R; Mon, 30 Aug 2021 16:40:53 +0000 Received: from wael.necoro.dev (localhost [IPv6:::1]) by wael.necoro.dev (Postfix) with ESMTP id 0DAE4E1B2D; Mon, 30 Aug 2021 18:40:51 +0200 (CEST) Received: from [192.168.0.35] ([31.17.204.50]) by wael.necoro.dev with ESMTPSA id gYS4OhMKLWFTmC0Ac/PHBg (envelope-from ); Mon, 30 Aug 2021 18:40:51 +0200 Subject: Re: autoload variables To: Anthony Fletcher , zsh-users@zsh.org References: From: =?UTF-8?Q?Ren=c3=a9_Neumann?= Message-ID: Date: Mon, 30 Aug 2021 18:40:51 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Seq: 26995 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: Am 30.08.21 um 17:22 schrieb Anthony Fletcher: > For instance, one variable is to identify the default uplink > interface > > export UPIF=$(ip -4 r | sed -n -e '/^default/ s/^default.*dev //; s/ > .*// p;q' ) > > Useful when I'm debugging the network but not needed otherwise. Is there a reason you need this as a variable? Would a function upif() { ip -4 r | ... } not suffice? - René