From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HTML_MESSAGE,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 30958 invoked from network); 20 Jun 2023 12:17:53 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 20 Jun 2023 12:17:53 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1687263473; b=IqdqU92b3IU/ePYdRBAcahQ8SrrzeKt68vKyesOpW5DDHujOO/f9Hy9NtLS7piDh2/cpCSlLPZ roByF6bZwE8t09531yRyV1oUNznZpWHcZzy14eGKW9P3/6tFTXDacCOMPGS+x45En/Cj/niiWI siaUZUP06tqBuP4WQDOmmJ2DsCBEOeFlgEi19/BArbac4DxGS7f5vanIgb0XDJB3ujVQLq11jI XMQeC7PeyBwX4lZXCRijgrI1IzByOt2P4fmnFsxEkNOjK6OpmQaBenB89zLH7Krm+kBcf8bWeX 1ICEx/ONYoufVCVf6DezwIp7S+1S171/RvQLc0dAfcBlNA==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (ambassador.madduck.net) smtp.remote-ip=188.174.253.166; dkim=pass header.d=madduck.net header.s=2015-11-14 header.a=rsa-sha256; dmarc=none header.from=debian.org; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1687263473; bh=Hb7Zt181VXKHRRzJ1s4v+AudF3li8ppoLlOXgQmIPDQ=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Transfer-Encoding:Content-Type:MIME-Version: Message-ID:Subject:Cc:To:From:Date:DKIM-Signature:DKIM-Signature; b=BV215ktEPrO/CkTZp3wN/eHf0KIpIUqx9RIhIPP4b3q0QYtNZ5xCZ2N/QX2cAa6YDU3Bco96DL 0Gl1U0Kw63UMI45A2yVURT/WXysvfpOZZLV9wLPikYqB+oYEsQFu84f6COX/RvKa3bJcfLOLG9 x0vtKbSp01Cv106F9DvPwnXKpsIRmYBGyV6QJehfQiTMEJV4cEpQsa9VxReXqqv5xGmF3H7kek W62M7RvqweGMT2hAvOabthyXIFPSm2C89aUxZPxmizIEU3huue53yeyQacSvCn6KoNgAtvu/Lm 7O4PLCi/7qafzg6iNshh4tTH0Vq0CV16/ycrlyFCFEHE6Q==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20210803; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-Transfer-Encoding: Content-Type:MIME-Version:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References; bh=6R5ziu1ztsHGiYJsNubmgS2KroR7nQ4lJzllRTDhxWM=; b=XSuXfwxg5p5QPud/e4YSKqhEAr exZEFGpY6uuF8iFdfGeCbHV0QGEuFpmFGM+Nn9InI9l0g0A4vU1y7fcSHjaO9glv6/GRQBavNaAFG M6zL9OoVHL8yEBOfbRwdOukLZA4mbCV9pHAgdUGkboujMQhOPnQT12ni77Gd6NpM2vnC0OtugH2U4 lv+G15wqifjqWtloM06qVgIuq0OxDEtdp/h0KlE1X1a8bRxMumnw3RzjsgNmBuE7pGjpEpXuL3O3m 1iIPFoZsvmx1lIF8JsXou9LK0HfOhyvvpJLEpj3t9syi6o4p9H7yMOa3GqoI9v7snO54EPElmtJv5 GR2Y51Mg==; Received: by zero.zsh.org with local id 1qBaIx-000Mzs-TL; Tue, 20 Jun 2023 12:17:51 +0000 Authentication-Results: zsh.org; iprev=pass (ambassador.madduck.net) smtp.remote-ip=188.174.253.166; dkim=pass header.d=madduck.net header.s=2015-11-14 header.a=rsa-sha256; dmarc=none header.from=debian.org; arc=none Received: from ambassador.madduck.net ([188.174.253.166]:51836) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1qBaII-000Mfw-Rf; Tue, 20 Jun 2023 12:17:13 +0000 X-MadduckNet-Submission: from albatross.lehel.madduck.net (unknown [IPv6:2001:a61:a8f:a00:f3ad:4324:96f9:27f2]); Creds Client CN "albatross.lehel.madduck.net", Issuer "R3" (not verified) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=madduck.net; s=2015-11-14; t=1687263430; bh=Hb7Zt181VXKHRRzJ1s4v+AudF3li8ppoLlOXgQmIPDQ=; h=Date:From:To:Cc:Subject:From; b=bA68UxG1NBBpsCY/uEm/X3LdV0Zk44lm1kzvUu19AlQQgnUiABhWUX+hjNzIliwcV Gn/n8qs3HMJndwEj5NC9h2j3Twbng22fbzDL5PvE2Bn0awMA2z7ilIGzbBR4Cl6WUU g6Le0jlWj63MgpVDAQ5eQMaLqiLnB+W+j2B86cTM= X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.8 at ambassador.madduck.net Date: Tue, 20 Jun 2023 14:17:09 +0200 From: martin f krafft To: zsh-workers@zsh.org Cc: 941214@bugs.debian.org Subject: Completion for mutt's -a command line switch Message-ID: Mail-Followup-To: zsh-workers@zsh.org, 941214@bugs.debian.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="6SQQ4VYRul7S9l7+" Content-Disposition: inline Content-Transfer-Encoding: 8bit Organization: The Debian project X-OS: Debian GNU/Linux trixie/sid kernel 6.4.0-0-amd64 x86_64 X-Motto: Keep the good times rollin' X-Subliminal-Message: debian/rules! X-Spamtrap: madduck.bogus@madduck.net X-Seq: 51878 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: , List-Subscribe: , List-Unsubscribe: , List-Post: List-Owner: List-Archive: --6SQQ4VYRul7S9l7+ Content-Type: text/plain; charset=utf-8; format=flowed; markup=markdown Content-Disposition: inline Content-Transfer-Encoding: 8bit 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 @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 --6SQQ4VYRul7S9l7+ Content-Type: text/html; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit -

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  
--6SQQ4VYRul7S9l7+--