summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--Completion/Linux/Command/_losetup5
2 files changed, 6 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 88537d383..0b6c6e429 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2021-08-27 Oliver Kiddle <opk@zsh.org>
+ * 49306: Completion/Linux/Command/_losetup: fix file
+ completion for the second parameter to losetup
+
* Štěpán Němec: 49234: Completion/Unix/Command/_python:
add missing options in python completion
diff --git a/Completion/Linux/Command/_losetup b/Completion/Linux/Command/_losetup
index 54debe19e..f5a7ec1b1 100644
--- a/Completion/Linux/Command/_losetup
+++ b/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"