zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <pws@csr.com>
To: zsh-workers@zsh.org
Subject: Re: global alias with leading space gives unexpected thing
Date: Wed, 28 Apr 2010 09:56:32 +0100	[thread overview]
Message-ID: <20100428095632.17c28aa2@csr.com> (raw)
In-Reply-To: <h2s237967ef1004271502ydadadad3p7612f7f824e33a7d@mail.gmail.com>

On Wed, 28 Apr 2010 00:02:00 +0200
Mikael Magnusson <mikachu@gmail.com> wrote:
> Maybe something like this is needed?
> 
> diff --git a/Src/lex.c b/Src/lex.c
> index 8f43251..83257da 100644
> --- a/Src/lex.c
> +++ b/Src/lex.c
> @@ -1774,7 +1774,7 @@ exalias(void)
>                 if (an && !an->inuse &&
>                     ((an->node.flags & ALIAS_GLOBAL) || incmdpos ||
> inalmore)) { inpush(an->text, INP_ALIAS, an);
> -                   if (an->text[0] == ' ')
> +                   if (an->text[0] == ' ' && !(an->node.flags &
> ALIAS_GLOBAL)) aliasspaceflag = 1;
>                     lexstop = 0;
>                     if (zshlextext == copy)

Yes, it's surely an oversight when it happens with global aliases.  I've
added this and noted it in the documentation.

-- 
Peter Stephenson <pws@csr.com>            Software Engineer
Tel: +44 (0)1223 692070                   Cambridge Silicon Radio Limited
Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, UK


Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom


      reply	other threads:[~2010-04-28  8:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-27 21:41 Dmitry Bolshakov
2010-04-27 22:02 ` Mikael Magnusson
2010-04-28  8:56   ` Peter Stephenson [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=20100428095632.17c28aa2@csr.com \
    --to=pws@csr.com \
    --cc=zsh-workers@zsh.org \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

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).