about summary refs log tree commit diff
path: root/Completion/Linux/Command/_losetup
blob: 359a9e0eade64363269f3d3d1a2cd579ad0a171a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#compdef losetup
# based on util-linux 2.26.2

_arguments -S -A '-*' \
  '(-l --list)'{-l,--list}'[list currently used loop devices]' \
  '(-n --noheadings)'{-n,--noheadings}'[do not print heading for --list output]' \
  '(-d --delete --detach -o --offset -a --all)'{-o,--offset}'+[specify data start is offset]:offset (bytes)' \
  '(-O --output)'{-O,--output}'[specify columns to be printed with --list]:column: _values -s , column name sizelimit offset autoclear ro back-file' \
  '(-P --partscan)'{-P,--partscan}'[scan the partition table of newly created loop devices]' \
  '--raw[raw output format]' \
  '(-r --read-only)'{-r,--read-only}'[set up a read-only loop device]' \
  '(-v --verbose)'{-v,--verbose}'[verbose mode]' \
  '(-V --version)'{-V,--version}'[display version information]' \
  '(-h --help)'{-h,--help}'[display help]' \
  '1:device:_files -g "/dev/loop<->"' \
  '(-d --delete --detach)2:file:_files' \
  - '(set1)' \
  '(-o --offset)'{-a,--all}'[show the status of all loop devices]' \
  - '(set2)' \
  {-c,--set-capacity}'[reread  the size of the file associated with the loop device]' \
  - '(set3)' \
  '(- 2)'{--delete,--detach,-d}'[detach from specified loop device]' \
  - '(set4)' \
  '(-D --detach-all)'{-D,--detach-all}'[detach all associated loop devices]' \
  - '(set5)' \
  {-f,--find}'[find the first unused loop device]' \
  - '(set6)' \
  {-j,--associated}'[show the status of all loop devices associated with an file]: : _files'