zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-workers@zsh.org
Subject: Re: buggy completion for zsh [TAB]
Date: Tue, 03 Apr 2012 10:21:05 -0700	[thread overview]
Message-ID: <120403102105.ZM11469@torch.brasslantern.com> (raw)
In-Reply-To: <20120403143853.GI4925@xvii.vinc17.org>

On Apr 3,  4:38pm, Vincent Lefevre wrote:
}
} ypig% zsh [TAB]
} shows all the files in the working directory.
} 
} ypig% zsh foo[TAB]
[shows files and commands beginning with "foo"]

This is because _sh always falls through to _default when there are no
arguments already on the command line, instead of taking the path where
_alternative is called for files and commands which it does when there
is at least one (partial) argument.

} ypig% zsh foob[TAB]
} foobar
} 
} which is not expected when the completion is unique.
} 
} [In] any case, following [TAB]'s have no effect.

This seems to be happening because of the initial call to _arguments that
is done by _sh only in the zsh case.  This leaves the completion seeming
to be "ambiguous".  If I simply move the [[ $service == zsh ]] block to
the end of _sh, things get a lot more sensible (but there's probably some
state saving/returning that needs to be added as well).

Also as it stands, after

% zsh foobar [TAB]

the options of zsh are completed even though they're no longer valid in
that position.

-- 
Barton E. Schaefer


      reply	other threads:[~2012-04-03 17:21 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-03 14:38 Vincent Lefevre
2012-04-03 17:21 ` Bart Schaefer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=120403102105.ZM11469@torch.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).