Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
zstyle ':completion:*' menu select=4 interactive
- X-seq: zsh-users 26167
- From: Thomas Lauer <thomas.lauer@xxxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: zstyle ':completion:*' menu select=4 interactive
- Date: Sat, 14 Nov 2020 10:36:21 +0000
- Archived-at: <https://zsh.org/users/26167>
- Archived-at: <http://www.zsh.org/sympa/arcsearch_id/zsh-users/2020-11/20201114103621.50ca012e079ba3bcd78a25a4%40virgin.net>
- Authentication-results: zsh.org; iprev=pass (know-smtprelay-omc-8.server.virginmedia.net) smtp.remote-ip=80.0.253.72; dkim=pass header.d=virgin.net header.s=meg.feb2017 header.a=rsa-sha256; dmarc=pass header.from=virgin.net; arc=none
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=virgin.net; s=meg.feb2017; t=1605350185; bh=WOp6pUZ40ycGxVXFPKlr0CxRmbBvKuQi2kVV2X9/c54=; h=Date:From:To:Subject; b=WAsPisVmhJxVrUCFv21zXU3y7XeM0W0lLl/gvifA91+U8trasMKov/nQbDM/ufbu2 nNI83RnhNGdvqLsGOzUBcJiD///HNJ7jcdNUn2V14nB9L90bYNLr3qydgZiNtEqj9k 1s5SwRaxeTX4gUlOMOvCBgMnyO2m6GxMmWwIfR2oVlVYCS3DrHXwxnSMwIGhy1g9gL o1L0m2S9G5kguAj5LYiaspnchTj3NHRuvhqZ/fVaSwM1fE8wt7AoeKok1dJdithnAq b+6HrOehBlpNy+pIwFltSIYJcWlAE4gMvturrnkqNlxzAZPWr2KFuzNzD72ERgD/aa lknCXHCamd6sQ==
- List-archive: <http://www.zsh.org/sympa/arc/zsh-users>
- List-help: <mailto:sympa@zsh.org?subject=help>
- List-id: <zsh-users.zsh.org>
- List-owner: <mailto:zsh-users-request@zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- List-subscribe: <mailto:sympa@zsh.org?subject=subscribe%20zsh-users>
- List-unsubscribe: <mailto:sympa@zsh.org?subject=unsubscribe%20zsh-users>
- Sender: zsh-users-request@xxxxxxx
Here's another long-standing problem I am having with zsh. I have
googgled for hours but found nothing (Google search these days is like
a cat: it brings home loads of things it thinks will please you but
which are not really what you were looking for. Google just knows
better than we do what we're searching for... But I digress.).
I have the subject line in my .zshrc (BTW this is 5.7.1). The tab is
bound to expand-or-complete-prefix. The trouble starts when the
interactive part of this kicks in, ie there are four or more items (if
there are fewer, all works fine) and if the cursor is somewhere in the
middle of a line I am editing.
So I do get the menu and I start navigating, with my current choice
being copied into the line that's edited. The problem is that this
choice overwrites part of the line I am editing. Consider this:
$ bla D<tab> somestuff # cursor behind the D when I press tab)
I get a few choices (say "D1/ Documents/ Dz2/ Dz3/ ..."), but nothing is
as yet inserted into the line. Now I press <right> and "Documents/" gets
inserted, overwriting the first few characters of somestuff. The line
now looks like this:
$ bla Documents/estuff # cursor behind the /)
Not what I want. So I have done an ugly hack to sort of solve this:
ugly() {
[[ ! -z $RBUFFER ]] && RBUFFER=" $RBUFFER"
zle expand-or-complete-prefix
}
...
zle -N ugly
with ugly() bound to the tab key. This (sort of) works but it's
pretty 'orrible.
I'm sure the zsh gurus have an idea what's going on here and can
point out the problem :-)
--
Tom
Messages sorted by:
Reverse Date,
Date,
Thread,
Author