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.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 4073 invoked from network); 25 Aug 2021 10:39:46 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 25 Aug 2021 10:39:46 -0000 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:Message-ID:Date:Content-ID: Content-Type:MIME-Version:Subject:To:From:Reply-To:Cc: Content-Transfer-Encoding:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References; bh=g07lE3VcOjGgbmQhwc1cBsFUVZBzQoq0a5eUUP53+WI=; b=neA/ODOmUtmCV4UPTi1NYpvKuq buK5vvkTiG0TkXOxJMmwjWmut+Hr6m90abo2/ILOLv6IblS7mr2cmOCyOb/4BJ0AyF6AVtl62LaO7 NlQPd5hfmMCIwSFGrZUVA8c97WiobSMVKPKW2diXqkF0rGB3XvnWimydKIzISMbZ1au3pTij/4KwI /T2pYXc6mU0SKVY9XvkDRujX1iYECXuKZunUMs+p5vWw0f73Pn87gh5F+1+Su4VvfSDnTDrsL+QTw Zu6GwiMUxJSiDcg9+Z5IRrIRZ7Jn4gKI+BgYtZzAnue9yr/dMjTdG4FlLHelFxEnuq4w2GouBeanB jHfVJYog==; Received: from authenticated user by zero.zsh.org with local id 1mIqJQ-00056m-BT; Wed, 25 Aug 2021 10:39:16 +0000 Received: from authenticated user by zero.zsh.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1mIqJ9-0004mr-QF; Wed, 25 Aug 2021 10:39:00 +0000 Received: from [192.168.178.21] (helo=hydra) by mail.kiddle.eu with esmtp(Exim 4.94.2) (envelope-from ) id 1mIqJ8-00029Q-Kd for zsh-workers@zsh.org; Wed, 25 Aug 2021 12:38:58 +0200 From: Oliver Kiddle To: Zsh workers Subject: PATCH: correction to losetup completion for creation mode MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <8270.1629887938.1@hydra> Date: Wed, 25 Aug 2021 12:38:58 +0200 Message-ID: <8271-1629887938.636411@EgbL.W0gs.POSY> X-Seq: 49306 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: 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"