Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Breakage with compctl?
- X-seq: zsh-workers 2782
- From: Zoltan Hidvegi <hzoli@xxxxxxxxxx>
- To: duvall@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx (Danek Duvall)
- Subject: Re: Breakage with compctl?
- Date: Sat, 11 Jan 1997 23:51:49 +0100 (MET)
- Cc: zsh-workers@xxxxxxxxxxxxxxx
- In-reply-to: <199701110304.WAA05421@xxxxxxxxxxxxxxxxxxxx> from Danek Duvall at "Jan 10, 97 10:04:37 pm"
> Run zsh -f and source a file containing the following:
>
> friends=( duvall )
>
> _machines=( lorien.princeton.edu cassius.mts.jhu.edu )
>
> function _get_hosts {
> typeset -l _user
> reply=()
> read -l
> _user=($=REPLY)
> reply=($_machines)
> }
>
> compctl -q -k friends -S @ -x 'n[0,@]' -K _get_hosts -- finger talk ytalk
>
> Now type:
>
> % finger duvall@lo<TAB>
>
> Which expands to
>
> % finger duvall@xxxxxxxxxxxxxxxxxxxx _
>
> Now erase back to the @:
>
> % finger duvall@_
>
> and expand:
>
> % <lots of garbage>
The fix is below. read -l was buggy.
Zoltan
*** Src/builtin.c 1997/01/11 00:45:31 3.1.1.14
--- Src/builtin.c 1997/01/11 22:22:50
***************
*** 2785,2791 ****
putchar('\n');
}
if (!ops['e'])
! setsparam(reply, (char *) line);
return 0;
}
--- 2785,2791 ----
putchar('\n');
}
if (!ops['e'])
! setsparam(reply, ztrdup((char *) line));
return 0;
}
Messages sorted by:
Reverse Date,
Date,
Thread,
Author