Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: autocompletion is broken in restricted shell



On Mon, May 8, 2017 at 9:48 AM, Peter Stephenson
<p.stephenson@xxxxxxxxxxx> wrote:
> On Mon, 8 May 2017 11:38:37 +0200
> Jan Kryl <jan.kryl@xxxxxxxxxxx> wrote:
>> That can be avoided by using 2>&- instead of 2>/dev/null.
>
> I'm not sure if you're realistically going to get an error message from
> there as long as the shell supports that syntax, so it's probably
> reasonable to apply this and see what happens.

Although this won't matter 90+% of the time because "enable" rarely
emits an error, I think it's going to complain when there IS an error:

% () { print -u2 OOPS } 2>&-
zsh: write error

If you're going to get error output anyway, you might as well drop the
2> and get *useful* error output.

However, there are a zillion other places in completion where we
redirect stderr to /dev/null, so changing that single one in compinit
isn't going to fix the general problem.



Messages sorted by: Reverse Date, Date, Thread, Author