dash.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Herbert Xu <herbert@gondor.apana.org.au>
To: Harald van Dijk <harald@gigawatt.nl>
Cc: DASH shell mailing list <dash@vger.kernel.org>
Subject: Re: [PATCH v2] Simplify alias storage.
Date: Sat, 4 May 2024 13:20:06 +0800	[thread overview]
Message-ID: <ZjXFhgpUpDxBcFAd@gondor.apana.org.au> (raw)
In-Reply-To: <b8e49c10-8d32-4c7b-a046-568c6e020eba@gigawatt.nl>

On Sun, Apr 28, 2024 at 01:43:37AM +0100, Harald van Dijk wrote:
> 
> Rather than storing the alias name and value separately, we can reduce
> simplify code and reduce code size by storing them in name=value form.
> This allows us to re-use some code from var.c to handle hashing and
> comparisons, so long as we update that to account for aliases' special
> handling of a leading = character. This is okay to do for variables as
> well, as for variables the leading character is guaranteed to not be =.
> ---
>  src/alias.c | 32 ++++++++++----------------------
>  src/input.c |  4 ++--
>  src/var.c   | 27 +++++++++++----------------
>  src/var.h   | 15 +++++++++++++++
>  4 files changed, 38 insertions(+), 40 deletions(-)

Patch applied.  Thanks.
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

      reply	other threads:[~2024-05-04  5:20 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-11 18:23 [PATCH] Simplify alias storage Harald van Dijk
2023-01-11 18:59 ` [PATCH][resend] " Harald van Dijk
2024-04-06  7:19 ` [PATCH] " Herbert Xu
2024-04-25 20:46   ` Harald van Dijk
2024-04-26  2:49     ` Herbert Xu
2024-04-28  0:43       ` [PATCH v2] " Harald van Dijk
2024-05-04  5:20         ` Herbert Xu [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZjXFhgpUpDxBcFAd@gondor.apana.org.au \
    --to=herbert@gondor.apana.org.au \
    --cc=dash@vger.kernel.org \
    --cc=harald@gigawatt.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).