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

Re: [PATCH] Increase $COLUMNS when generating long option completions



On Thu, Aug 5, 2021 at 11:12 AM Marlon Richert <marlon.richert@xxxxxxxxx> wrote:
>
> I don't know if it makes sense to always set
> COLUMNS in _call_program, because it is not always called to produce
> visual output. On the other hand, if you think it won't hurt, then
> yes, that might be a better option.

I can't think of a case where it would be an issue ... if the program
isn't producing output meant for the terminal, it shouldn't be
bothered by either the presence or absence of $COLUMNS.  I'm now
pondering whether your original method does either a better or a worse
(or neither) job if the called program uses a remote shell or the
like.

> I made it 999, rather than $COLUMNS, because the output is cached and
> terminal emulators can be resized.

Hrm.  That sounds like a problem with the cache validation rules, but
I suppose setting a large value of COLUMNS is a reasonable safeguard.




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