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.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 10037 invoked from network); 1 Sep 2021 08:31:01 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 1 Sep 2021 08:31:01 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1630485061; b=EEucYAXUpSyRWpxFYCFSu4hIFgVx4GWowOPc5mmJ+GlijGgVh+yYlcFbg0AQytLppRmoNK9D9z Up4LuhjBnWql+tjr5Ise66oXRbOaEF/hpSu7Ak27fAuYJhmJ05sFz1OkKXvudyasf2+8gR+7Yi GGBpw3YG3NiEvOxiYeEaVlZV6LKeAb52s8S097THg6sIZZHi4fpWSGqxUCBVMgCWnVBhtcjcAa X0Z+IjJS9VJCKrCUg4Bqw2AXESKlO8fZE/kXSx4t8X3jmqP+/IY6YM/JpMmEQ9AHPgsxnQXtRU qCzObuQbX2kMLP3i7HCNnZWOLmDVsiUoUFOQjsse0/UcAg==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (aurora-borealis.phear.org) smtp.remote-ip=188.42.45.194; dkim=pass header.d=phear.org header.s=20180217 header.a=rsa-sha256; dmarc=none header.from=phear.org; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1630485061; bh=GF92zn+DGRuGeT4lgLMBU/gCTDdhxo4HLNaSfUO4nCw=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:In-Reply-To:Content-Transfer-Encoding:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:DKIM-Signature: DKIM-Signature; b=MOUkLjZorjn5UBryIn2nH5OMEFmFVzETxB1cIoqGCJvo2E3si6lxCTLEbayD5Obk2EvYo5+rOd +5udwL4fd6KSNySAatBK6y2mc4VplzmVyEnAilfa5sunDXu8RGkXKzadgsXm08WQ4ZaoqErbhO 9TwQEXfJQWARw2mzCV7HCk8BmUR7Pdigb+9lwFN5XTWuTcw02LWoBFVFPnbaOqhge9XGnok5jS 8A5NHHuKvXWXcE/vrmgmZOyLHBFozsHYOgBGWVeCq4m4cIkju3g058xAqJ9bktWR54EJBckcNr t0mklAwlCP38GuqENBZ4pyp2JS1LwoB3I40B74j8WzJ/RQ==; 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:In-Reply-To:Content-Transfer-Encoding :Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID; bh=t4FvXrThGI0Mm/vj/T6Et+hWN/BrJnCkaV3Mv44hj2s=; b=R3aoL8Ab4vpp5AzQrKX2/SgQ/q pZRmEoydm8o4P4IvtagGIjL+CouPPfoPI2OazD0c8AuTv46/+BFKILymOcW+sOGR2djxSj64zH1wg 4TUnTlHBuqRO1piIb3to7AWAzm/HYhzjI7TzQrCcfTyd++a5xHhEeitHUeIC3WY39gHFKbN0hqCjw 9eyVik2N/C3jAjeDstwRJVFnDvKD/8wF/xl7yeZaOg9JVSklv/wwnG5Nv159DgGM3XUuYIkbHGNAA /HRT7UegTf17v9MRj3YnDmNSShvPQopTzTKnzubjnFmDLd7s4xisK/O+63QkbJRlEzaCZEppXJP5T rdvaOxrQ==; Received: from authenticated user by zero.zsh.org with local id 1mLLe8-000MeM-6s; Wed, 01 Sep 2021 08:31:00 +0000 Authentication-Results: zsh.org; iprev=pass (aurora-borealis.phear.org) smtp.remote-ip=188.42.45.194; dkim=pass header.d=phear.org header.s=20180217 header.a=rsa-sha256; dmarc=none header.from=phear.org; arc=none Received: from aurora-borealis.phear.org ([188.42.45.194]:52056) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1mLLdB-000Ltz-MK; Wed, 01 Sep 2021 08:30:02 +0000 Received: from localhost (unknown [127.0.0.1]) by aurora-borealis.phear.org (Postfix) with ESMTP id D3156103F9; Wed, 1 Sep 2021 08:29:59 +0000 (UTC) X-Virus-Scanned: amavisd-new at phear.org Received: from aurora-borealis.phear.org ([127.0.0.1]) by localhost (mail.phear.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id O8YOuWLH5NC3; Wed, 1 Sep 2021 08:29:55 +0000 (UTC) Received: from prometheus.u-strasbg.fr (82-65-50-238.subs.proxad.net [82.65.50.238]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: khatar) by aurora-borealis.phear.org (Postfix) with ESMTPSA id 33104103F8; Wed, 1 Sep 2021 08:29:55 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.10.3 aurora-borealis.phear.org 33104103F8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=phear.org; s=20180217; t=1630484995; bh=GF92zn+DGRuGeT4lgLMBU/gCTDdhxo4HLNaSfUO4nCw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=dzWA4NSod6QC1Cji4dlkwISkGJHMxwyoM8K04pCgTnmhbOhvzLoNtwmxjBPE9g3yU F1gEbX5qm/Zz9Sl6jYoHwhLaelrNRikikZGj4F6gn6HxGGMdiQ3aoX65nPuGvx+qbb HgaP4an3YgkRe+EEd9H7b+FQm6qV9MkBKtqvNkcMZNTVgspt9iGChiccYW1HiZ3/3a P9Lw2S674z4cUMm6wx9ZY+z3gi8W8ChUc2O/VgXtcXyDuSy6dpLKxW8gHP6i+UC8VK fMkYH9tZan3Rd8QZ4C70igflIS36Cl/EVhOXJsiXPrP28MVTiHmzIi4juUQPBcmIHh WxwyCqP6y7RRQ== Date: Wed, 1 Sep 2021 10:29:50 +0200 From: Marc Chantreux To: Roman Perepelitsa Cc: Anthony Fletcher , Zsh Users Subject: Re: autoload variables Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Seq: 27046 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: Hi Roman, Le Tue, Aug 31, 2021 at 11:03:39PM +0200, Roman Perepelitsa a écrit : > sed -n -e '/^default/ s/^default.*dev //; s/ .*// p;q' > In plain English: english is fine. can you confirm that '/^default/ s/^default.*dev //' is a suttered way to say 's/^default.*dev //' ? > 2. If a portion of the line matches '^default.*dev', remove it i realize i assumed in the first place that 'default dev' was the only valid part but i just saw there can be a 'via something' subpart. > 1. Take the first line. that's what i was afraid about. does ip r garanty that? my version was sed ' /^default.*dev /!d # do nothing until you find a match # so the next commands applies only on the valid line s///d # remove what you just found s/ .*//d # remove the tail of the sentence q # print and quit ' Regards marc