Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Use external tool if there are a large number of completions
- X-seq: zsh-workers 47384
- From: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
- To: gi1242+zsh@xxxxxxxxx
- Subject: Re: Use external tool if there are a large number of completions
- Date: Mon, 14 Sep 2020 00:14:07 +0000
- Archived-at: <https://zsh.org/workers/47384>
- Archived-at: <http://www.zsh.org/sympa/arcsearch_id/zsh-workers/2020-09/20200914001407.3620aa3f%40tarpaulin.shahaf.local2>
- Authentication-results: zsh.org; iprev=pass (out2-smtp.messagingengine.com) smtp.remote-ip=66.111.4.26; dkim=pass header.d=daniel.shahaf.name header.s=fm1 header.a=rsa-sha256; dkim=pass header.d=messagingengine.com header.s=fm3 header.a=rsa-sha256; dmarc=none header.from=daniel.shahaf.name; arc=none
- Cc: zsh-workers@xxxxxxx
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= daniel.shahaf.name; h=date:from:to:cc:subject:message-id :in-reply-to:references:mime-version:content-type :content-transfer-encoding; s=fm1; bh=1/KRo+Vk/kbeostQoBLa6t0GGN 8wFVzov7K18cTG/7w=; b=GtvZ2BV0kQvZN/jptFRYZbX/Kui79/vRn8TvMczA9I 5Vj6JWfClfpedoddzFV046TGXEJfBnFsTTQjJk7Rv2pRnHFUQvz7wF3lFVSxjpzA qe3oM873p0UIz3xMEXBOrxJfwoQImUXrW4fKGnC00t66K8XE/Qx3ixJjICs3Xi3f i755U8CYK7HT3u5+LWyJFUlFtrZbzQd/jbH0Xp+eopXA4xIMxe1bNhLa0FmcS75s BG7BpstqMYJG1tJzqQ3qZ1reactFnRykzAm9EcDsiVBsrxJ06/l1C31m3JXasT97 XipmA01ytrp4wWRMbIUWys30ju5Pfbup3NhguNpY0DwA==
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=1/KRo+Vk/kbeostQoBLa6t0GGN8wFVzov7K18cTG/ 7w=; b=rHMZ08Efoe1dfw0rciCPGt9b+HbV48WOO68dUpW2H5kyRYC9FIE3RKVuC VjxDjMrIRXO2C8Wl32qnvYTtnSmlIoDoIuiAobVsyOphhhpk7ANgVzE7kM2Jx+NS H5IsPEO86g4J5FO+3fw2ZHtuwYiKB+0iTAyOrA16/J97Js/RX7z4ThLxSvVjkBEm SUO8ZkFjWBBkiRZpE6z4MCbqpxHjA6CikgdBN7ki5u1szB2okEiHv4HQtjoPa3gS LWjflukPrtRDbD/+F2of08WAQ2/ph3DfJfnpcJ0EAXnF7LjbxZwiqMZ7ebnHY0rJ jp0sCbxoZoly3KTJw/Wdwkac2Kqqw==
- In-reply-to: <20200913222122.GA4031@andrew.cmu.edu>
- List-archive: <http://www.zsh.org/sympa/arc/zsh-workers>
- List-help: <mailto:sympa@zsh.org?subject=help>
- List-id: <zsh-workers.zsh.org>
- List-owner: <mailto:zsh-workers-request@zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-subscribe: <mailto:sympa@zsh.org?subject=subscribe%20zsh-workers>
- List-unsubscribe: <mailto:sympa@zsh.org?subject=unsubscribe%20zsh-workers>
- References: <20200913222122.GA4031@andrew.cmu.edu>
- Sender: zsh-workers-request@xxxxxxx
gi1242+zsh@xxxxxxxxx wrote on Sun, 13 Sep 2020 18:21 -0400:
> I was wondering if it's possible to use an external tool if there are
> more than a certain number of completions. Sometimes there are thousands
> of completions (eg apt install), and the keyboard interface isn't too
> efficient. However, things like "rofi" handle this very nicely. So is it
> possible to invoke a custom command (e.g. rofi -dmenu) if there is more
> than (say) half a screenful of completions?
[ For context, rofi(1) is a GUI tool for selecting one text line out of a list. ]
You might be able to engineer something using «compadd -O».
There's also <https://github.com/Valodim/zsh-capture-completion>,
though I haven't used it myself.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author