Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

completion for 'alerter'

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`

-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?



Messages sorted by: Reverse Date, Date, Thread, Author