zsh-users
 help / color / mirror / code / Atom feed
From: TJ Luoma <luomat@gmail.com>
To: Zsh MailingList <zsh-users@zsh.org>
Subject: completion for 'alerter'
Date: Thu, 5 Mar 2020 23:45:26 -0500	[thread overview]
Message-ID: <CADjGqHsBxpfpoNNS-5D1SJTzMdnjE-Y+B4qfkwMW1ddVSSiLww@mail.gmail.com> (raw)

I just learned of a new tool called 'alerter'
(https://github.com/vjeantet/alerter) and wondered if someone could
explain how to make a completion for the various options that it has.
I've never really understood how to create a completion.

For example, when I type 'tar -' followed by 'tab' I get this:

$ tar -[tab]
tar function
A  -- append to an archive
c  -- create a new archive
f  -- specify archive file or device
t  -- list archive contents
u  -- update archive
v  -- verbose output
x  -- extract files from an archive

These are the options for `alerter`

-help
-json
-message VALUE
-remove ID
-list ID
-reply VALUE
-actions VALUE1,VALUE2
-dropdownLabel VALUE
-title VALUE
-subtitle VALUE
-closeLabel VALUE
-sound NAME
-group ID
-sender ID
-appIcon URL
-contentImage URL
-timeout NUMBER

I came across https://github.com/zsh-users/zsh-completions/blob/master/zsh-completions-howto.org
which is supposed to explain how to write a completion, but I'm afraid
that I don't really follow most of it.

Is there a simpler starter tutorial or does someone have an example
completion that I might be able to modify?

Thanks

Tj

             reply	other threads:[~2020-03-06  4:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20200306044721eucas1p2ef2d8e761171b32b9c49ac98cd8fce8b@eucas1p2.samsung.com>
2020-03-06  4:45 ` TJ Luoma [this message]
2020-03-06  9:51   ` Peter Stephenson
2020-03-06 15:21     ` Mikael Magnusson

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=CADjGqHsBxpfpoNNS-5D1SJTzMdnjE-Y+B4qfkwMW1ddVSSiLww@mail.gmail.com \
    --to=luomat@gmail.com \
    --cc=zsh-users@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).