zsh-workers
 help / color / mirror / code / Atom feed
From: martin f krafft <madduck@debian.org>
To: zsh-workers@zsh.org
Cc: 941214@bugs.debian.org
Subject: Completion for mutt's -a command line switch
Date: Tue, 20 Jun 2023 14:17:09 +0200	[thread overview]
Message-ID: <ZJGYxWZbtchA2COe@albatross.lehel.madduck.net> (raw)

[-- Attachment #1: Type: text/plain, Size: 1145 bytes --]

Hey,

mutt allows attaching files from the command-line:

```
mutt -a /file/one /file/two /file/three -- …
```

Basically, the rules are: `-a` takes a list of files, terminated by 
`--`.

Zsh's completion of mutt treats the argument to `-a` as optional:

```
   '*-a[attach file using MIME]::file attachment:_files' \
```

Therefore, after `-a`, mutt's completions include recipients, which 
is not correct:

```
albatross:~% mutt -a toni^D
directory
toni/
recipient
toni@…
```

Could you please help me figure out how to fix this? Basically after 
it sees `-a`, compsys should be offering `_files` until `--` is 
encountered, and also: at least one file is mandatory.

Thanks,

-- 
  .''`.   martin f. krafft <madduck@d.o> @martinkrafft
: :'  :  proud Debian developer
`. `'`   http://people.debian.org/~madduck
   `-  Debian - when you have better things to do than fixing systems
  
"he gave me his card
  he said, 'call me if they die'
  i shook his hand and said goodbye
  ran out to the street
  when a bowling ball came down the road
  and knocked me off my feet"
                                                         -- bob dylan

[-- Attachment #2: Type: text/html, Size: 2548 bytes --]

             reply	other threads:[~2023-06-20 12:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-20 12:17 martin f krafft [this message]
2023-06-20 19:28 ` Eric Cook
2023-09-20 22:52 ` Oliver Kiddle

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=ZJGYxWZbtchA2COe@albatross.lehel.madduck.net \
    --to=madduck@debian.org \
    --cc=941214@bugs.debian.org \
    --cc=zsh-workers@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).