Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Three questions about a completer
- X-seq: zsh-users 21907
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Zsh Users <zsh-users@xxxxxxx>
- Subject: Re: Three questions about a completer
- Date: Wed, 14 Sep 2016 09:39:03 -0700
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:date:in-reply-to:comments:references:to:subject :mime-version; bh=T1z5wVAtyDEDmkgoLmQ22kXWCV7lrFf+MG+b6Ge/j0I=; b=T7HNXvP7C3jRbTMTHHJ8Q1+UIm0u6C6dZ2K97uL/L5NSUeVYct+K2rhZPmQcvaYZCd AxuNKOQv9ktJKiQyEOsAooL6OMUahIIODgBKZf5ZwbkoADs1b6Zeqcgd1dEdS0MtcVTq wn+uHH4UhAI9Q6W0QHSCkBcBd8+LKCu/oidGJQmHOHutkY9ggAnfCHwrP0sNSNau52h3 Dm7Lwj3zNAR81mu4VjQ4sh9Q/rT0CaBJc6rJJksN7syS/YVQ490j6retYzj4rsMNACqF tNDszzjuOuelwLdV/Kte4Rd3Shy2+e/RNYq6j+jp03Xm3PIMRxPjBAFb/iv98rPLKpaW FntQ==
- In-reply-to: <CABZhJg-GPxn87gHX4+z-Md2kN7Wq4Ay=6db_uW762-4PQ9dKsA@mail.gmail.com>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <CABZhJg-VR4ss0KpxLvUnrUS7JnTVGGdSWePH7NzCzQvdimMubg@mail.gmail.com> <75335.1473713583@hydra.kiddle.eu> <CABZhJg_kVjB4Wb1FH2xb7=dB8wU4pLLa8H7Jf4+p-Mahjv3wPA@mail.gmail.com> <CABZhJg_4b6GiCo1J3BHzL0ACwao5Q_-HQgnhuHjQowUF+FVemQ@mail.gmail.com> <160913195916.ZM30431@torch.brasslantern.com> <CABZhJg-GPxn87gHX4+z-Md2kN7Wq4Ay=6db_uW762-4PQ9dKsA@mail.gmail.com>
On Sep 14, 9:22am, Jesper Nygards wrote:
}
} I am getting closer: the problem with numeric is now solved with your
} suggestions, as well as turning off the listing of alternatives. However
} I still have trouble reversing the menu completion direction.
I think all you need is this:
_list-result() {
compadd -M 'l:|=* m:{[:lower:]}={[:upper:]}' -f ${__lsdir:-HOME}/*
# Even if there are multiple matches, don't list them out
compstate[list]=''
# In case we are already in the middle of a menu completion,
# ignore the compadd above and continue in the current menu
compstate[insert]='menu'
}
It may be necessary in some edge cases to examine $compstate[insert]
and update it differently; read the doc and experiment with what the
state of $compstate[insert] is upon entry to _list-result.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author