zsh-workers
 help / color / mirror / code / Atom feed
From: Oliver Kiddle <opk@zsh.org>
To: Zsh workers <zsh-workers@zsh.org>
Subject: PATCH: correction to losetup completion for creation mode
Date: Wed, 25 Aug 2021 12:38:58 +0200	[thread overview]
Message-ID: <8271-1629887938.636411@EgbL.W0gs.POSY> (raw)

I noticed a lack of expected file completion in the second argument to
losetup for setting up a device and it seems that mode isn't right in
the completion. This should fix it.

Oliver

diff --git Completion/Linux/Command/_losetup Completion/Linux/Command/_losetup
index 54debe19e..f5a7ec1b1 100644
--- Completion/Linux/Command/_losetup
+++ Completion/Linux/Command/_losetup
@@ -33,14 +33,15 @@ _arguments -s -S \
   {-D,--detach-all}'[detach all associated loop devices]' \
   - 'create' \
   '--direct-io[open backing file with O_DIRECT]::enable:(on off)' \
-  '(-f --find 2)'{-f,--find}'[find the first unused loop device]' \
+  '(-f --find 1)'{-f,--find}'[find the first unused loop device]' \
   '(-L --nooverlap)'{-L,--nooverlap}'[avoid possible conflict between devices]' \
   '(-P --partscan)'{-P,--partscan}'[scan the partition table of newly created loop devices]' \
   '--sizelimit[limit device to specified size]:size (bytes)' \
   '(-b --sector-size)'{-b+,--sector-size=}'[set logical sector size of loop device]:size (bytes)' \
   '--show[print device name after setup]' \
   '(-r --read-only)'{-r,--read-only}'[set up a read-only loop device]' \
-  '1:file:_files' \
+  "(-f)$device" \
+  '2:file:_files' \
   - 'assoc' \
   '(-j --associated)'{-j,--associated}'[show the status of all loop devices associated with an file]:associated file:_files' \
   "(-f)$device"


                 reply	other threads:[~2021-08-25 10:39 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=8271-1629887938.636411@EgbL.W0gs.POSY \
    --to=opk@zsh.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).