From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2633 invoked by alias); 23 Mar 2018 10:15:59 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: List-Unsubscribe: X-Seq: 42506 Received: (qmail 23725 invoked by uid 1010); 23 Mar 2018 10:15:59 -0000 X-Qmail-Scanner-Diagnostics: from forward4j.cmail.yandex.net 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(5.255.227.22):SA:0(-1.9/5.0):. Processed in 10.182295 secs); 23 Mar 2018 10:15:59 -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=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, SPF_PASS,T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.1 X-Envelope-From: kp-pav@yandex.ru X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1521799750; bh=hxLfsCwDBfFj8PqabZpnUr3TkPRIuAVVoPmzSdeiyn0=; h=From:To:In-Reply-To:References:Subject:Message-Id:Date; b=QXkBDwJIUE70PDOzxXfehi56DoyJygLHVOiiqR06IlH86cGvg8mRt6Oo8s+T8vmV6 +R7ZlRCbqr/dqkF9WZD7paOezdMMKAem4g3OjMSROdxj6u7fsusabBrtLJvOHm2/4Q Z7lNKn0OF0HcuWIN3RrQH6b+0kgXSd0FIek8rlI0= Authentication-Results: mxback3j.mail.yandex.net; dkim=pass header.i=@yandex.ru From: "Nikolay Aleksandrovich Pavlov (ZyX)" To: Joey Pabalinas , "zsh-workers@zsh.org" In-Reply-To: <20180322011905.45n377wsxp62k57e@gmail.com> References: <20180322011905.45n377wsxp62k57e@gmail.com> Subject: Re: [PATCH] Allow '=' aliases to be used with -L MIME-Version: 1.0 Message-Id: <784731521799750@web19o.yandex.ru> X-Mailer: Yamail [ http://yandex.ru ] 5.0 Date: Fri, 23 Mar 2018 13:09:10 +0300 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=utf-8 22.03.2018, 04:19, "Joey Pabalinas" : > Special case '=' aliases so that they can be output correctly > by -L and be used in startup scripts. > > Signed-off-by: Joey Pabalinas > >  1 file changed, 10 insertions(+), 4 deletions(-) > > diff --git a/Src/hashtable.c b/Src/hashtable.c > index b7baa314220509240d..62f8e9df3b99b6d5e2 100644 > --- a/Src/hashtable.c > +++ b/Src/hashtable.c > @@ -1303,11 +1303,17 @@ printaliasnode(HashNode hn, int printflags) >      } > >      if (printflags & PRINT_LIST) { > - /* Fast fail on unrepresentable values. */ > + /* > + * '=' aliases need to be special > + * cased with direct alias table > + * assignment (`aliases[=]=...`). > + */ >          if (strchr(a->node.nam, '=')) { > - zwarn("invalid alias '%s' encountered while printing aliases", > - a->node.nam); > - /* ### TODO: Return an error status to the C caller */ > + printf("aliases[=]"); This looks like all aliases having `=` in them will be printed with exactly the same key `=`, including those which are not equal to `=`. > + putchar('='); > + quotedzputs(a->text, stdout); > + > + putchar('\n'); >              return; >          } > > -- > 2.16.2