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

Re: completion within a function

On Sat, Jan 2, 2021 at 4:25 PM Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> On Fri, Jan 1, 2021 at 4:27 PM Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> >
> > Ahh ... because it's zpty, the cursor movements get captured along
> > with everything else.
> How about this?
> ubuntu% complete git --
> --bare
> --exec-path
> --git-dir
> --help
> --html-path
> --info-path
> --literal-pathspecs
> --man-path
> --namespace
> --no-pager
> --no-replace-objects
> --paginate
> --version
> --work-tree

I only get 'git --'. It probably depends on your ~/.zshrc

I'm trying it like this:

  ZDOTDIR=/tmp/empty-home zsh /tmp/complete-bart 'git --'

The same with my version works fine.

> Earlier, Felipe wrote:
> > LISTMAX=1000 # There seems to be a bug in zsh with several thousands
> Could this be happening because "zpty -r" will only return up to one
> megabyte of output?  If not, what's the symptom of the bug?

Probably. The symptom I experienced is that the command never ends,
apparently because the end marker never arrives.

However, I'm trying right now with something as low as 10, and it
still hangs. So I probably added that comment just to highlight that
anything above 1000 is going to fail regardless.


Felipe Contreras

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