Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: global alias with leading space gives unexpected thing
- X-seq: zsh-workers 27930
- From: Peter Stephenson <pws@xxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: global alias with leading space gives unexpected thing
- Date: Wed, 28 Apr 2010 09:56:32 +0100
- In-reply-to: <h2s237967ef1004271502ydadadad3p7612f7f824e33a7d@xxxxxxxxxxxxxx>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- Organization: Cambridge Silicon Radio
- References: <44891272404484@xxxxxxxxxxxxxxxx> <h2s237967ef1004271502ydadadad3p7612f7f824e33a7d@xxxxxxxxxxxxxx>
On Wed, 28 Apr 2010 00:02:00 +0200
Mikael Magnusson <mikachu@xxxxxxxxx> 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@xxxxxxx> 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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author