2013-03-23 11:18:37 -05:00
|
|
|
_sfdisk_module()
|
|
|
|
{
|
|
|
|
local cur prev OPTS
|
|
|
|
COMPREPLY=()
|
|
|
|
cur="${COMP_WORDS[COMP_CWORD]}"
|
|
|
|
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
|
|
|
case $prev in
|
bash-completion: update disk-utils
fdformat:
Add --from, --to, and --repair options.
Commit: e0402441a143533d33d3c450471b2cd655407d77
fdisk:
Add --output [1], --bytes [2], --wipe [3], --wipe-partition [4], and
remove --geom- from from --cylinders, --heads, --sector options [5].
Commit [1]: fff8ad5882308825a131c645e4d28bcaef943351
Commit [2]: 354f8cc8cf06de44656fb83705c57062d04d1565
Commit [3]: cb9a4b0033eca429689a403be2a192fe2842f2e9
Commit [4]: ba465623d84b9e330f248a477d078b5f280b7943
Commit [5]: 4b4e391a28b4dfeb69781c20190bffe8622d1907
fsck.cramfs:
Broken since first commit.
Commit: bf60993cf2442f67bd47bcfcf6bd49c7392c2ba1
mkswap:
Provide random uuid when completing --uuid argument.
partx:
Add --sector-size option. Fix also list of known partition types to
match with libblkid blkid_idinfo names. The fix is also applied to
manual page.
Commit: f8a4a0d4f2fd569252029bd004e24ee433b43fe8
Reference: git grep -A 4 blkid_idinfo libblkid/src/partitions | grep name
sfdisk:
Add --reoder, --delete, --mode-dataa, -no-tell-kernel, --wipe, and
--wipe-partitions options. In same go fix some option argument
completions.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2017-04-11 14:30:02 -05:00
|
|
|
'-d'|'--dump'|'-J'|'--json'|'-l'|'--list'|'-F'|'--list-free'|'-r'|'--reorder'|'-s'|'--show-size'|'-V'|'--verify'|'-A'|'--activate'|'--delete')
|
2019-09-19 08:40:13 -05:00
|
|
|
compopt -o bashdefault -o default
|
bash-completion: update disk-utils
fdformat:
Add --from, --to, and --repair options.
Commit: e0402441a143533d33d3c450471b2cd655407d77
fdisk:
Add --output [1], --bytes [2], --wipe [3], --wipe-partition [4], and
remove --geom- from from --cylinders, --heads, --sector options [5].
Commit [1]: fff8ad5882308825a131c645e4d28bcaef943351
Commit [2]: 354f8cc8cf06de44656fb83705c57062d04d1565
Commit [3]: cb9a4b0033eca429689a403be2a192fe2842f2e9
Commit [4]: ba465623d84b9e330f248a477d078b5f280b7943
Commit [5]: 4b4e391a28b4dfeb69781c20190bffe8622d1907
fsck.cramfs:
Broken since first commit.
Commit: bf60993cf2442f67bd47bcfcf6bd49c7392c2ba1
mkswap:
Provide random uuid when completing --uuid argument.
partx:
Add --sector-size option. Fix also list of known partition types to
match with libblkid blkid_idinfo names. The fix is also applied to
manual page.
Commit: f8a4a0d4f2fd569252029bd004e24ee433b43fe8
Reference: git grep -A 4 blkid_idinfo libblkid/src/partitions | grep name
sfdisk:
Add --reoder, --delete, --mode-dataa, -no-tell-kernel, --wipe, and
--wipe-partitions options. In same go fix some option argument
completions.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2017-04-11 14:30:02 -05:00
|
|
|
COMPREPLY=( $(compgen -W "$(lsblk -dpnro name)" -- $cur) )
|
|
|
|
return 0
|
|
|
|
;;
|
|
|
|
'-N'|'--partno')
|
2013-03-23 11:18:37 -05:00
|
|
|
COMPREPLY=( $(compgen -W "number" -- $cur) )
|
|
|
|
return 0
|
|
|
|
;;
|
bash-completion: update disk-utils
fdformat:
Add --from, --to, and --repair options.
Commit: e0402441a143533d33d3c450471b2cd655407d77
fdisk:
Add --output [1], --bytes [2], --wipe [3], --wipe-partition [4], and
remove --geom- from from --cylinders, --heads, --sector options [5].
Commit [1]: fff8ad5882308825a131c645e4d28bcaef943351
Commit [2]: 354f8cc8cf06de44656fb83705c57062d04d1565
Commit [3]: cb9a4b0033eca429689a403be2a192fe2842f2e9
Commit [4]: ba465623d84b9e330f248a477d078b5f280b7943
Commit [5]: 4b4e391a28b4dfeb69781c20190bffe8622d1907
fsck.cramfs:
Broken since first commit.
Commit: bf60993cf2442f67bd47bcfcf6bd49c7392c2ba1
mkswap:
Provide random uuid when completing --uuid argument.
partx:
Add --sector-size option. Fix also list of known partition types to
match with libblkid blkid_idinfo names. The fix is also applied to
manual page.
Commit: f8a4a0d4f2fd569252029bd004e24ee433b43fe8
Reference: git grep -A 4 blkid_idinfo libblkid/src/partitions | grep name
sfdisk:
Add --reoder, --delete, --mode-dataa, -no-tell-kernel, --wipe, and
--wipe-partitions options. In same go fix some option argument
completions.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2017-04-11 14:30:02 -05:00
|
|
|
'--color'|'-w'|'--wipe'|'-W'|'--wipe-partitions')
|
2015-08-02 15:24:08 -05:00
|
|
|
COMPREPLY=( $(compgen -W "auto never always" -- $cur) )
|
|
|
|
return 0
|
|
|
|
;;
|
bash-completion: update disk-utils
fdformat:
Add --from, --to, and --repair options.
Commit: e0402441a143533d33d3c450471b2cd655407d77
fdisk:
Add --output [1], --bytes [2], --wipe [3], --wipe-partition [4], and
remove --geom- from from --cylinders, --heads, --sector options [5].
Commit [1]: fff8ad5882308825a131c645e4d28bcaef943351
Commit [2]: 354f8cc8cf06de44656fb83705c57062d04d1565
Commit [3]: cb9a4b0033eca429689a403be2a192fe2842f2e9
Commit [4]: ba465623d84b9e330f248a477d078b5f280b7943
Commit [5]: 4b4e391a28b4dfeb69781c20190bffe8622d1907
fsck.cramfs:
Broken since first commit.
Commit: bf60993cf2442f67bd47bcfcf6bd49c7392c2ba1
mkswap:
Provide random uuid when completing --uuid argument.
partx:
Add --sector-size option. Fix also list of known partition types to
match with libblkid blkid_idinfo names. The fix is also applied to
manual page.
Commit: f8a4a0d4f2fd569252029bd004e24ee433b43fe8
Reference: git grep -A 4 blkid_idinfo libblkid/src/partitions | grep name
sfdisk:
Add --reoder, --delete, --mode-dataa, -no-tell-kernel, --wipe, and
--wipe-partitions options. In same go fix some option argument
completions.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2017-04-11 14:30:02 -05:00
|
|
|
'-o'|'--output')
|
|
|
|
local prefix realcur OUTPUT_ALL OUTPUT
|
|
|
|
realcur="${cur##*,}"
|
|
|
|
prefix="${cur%$realcur}"
|
|
|
|
OUTPUT_ALL="
|
|
|
|
Attrs Boot Bsize Cpg Cylinders Device End
|
|
|
|
End-C/H/S Flags Fsize Id Name Sectors Size
|
|
|
|
Slice Start Start-C/H/S Type Type-UUID UUID
|
|
|
|
"
|
|
|
|
for WORD in $OUTPUT_ALL; do
|
|
|
|
if ! [[ $prefix == *"$WORD"* ]]; then
|
2017-06-30 17:13:58 -05:00
|
|
|
OUTPUT="$WORD ${OUTPUT:-""}"
|
bash-completion: update disk-utils
fdformat:
Add --from, --to, and --repair options.
Commit: e0402441a143533d33d3c450471b2cd655407d77
fdisk:
Add --output [1], --bytes [2], --wipe [3], --wipe-partition [4], and
remove --geom- from from --cylinders, --heads, --sector options [5].
Commit [1]: fff8ad5882308825a131c645e4d28bcaef943351
Commit [2]: 354f8cc8cf06de44656fb83705c57062d04d1565
Commit [3]: cb9a4b0033eca429689a403be2a192fe2842f2e9
Commit [4]: ba465623d84b9e330f248a477d078b5f280b7943
Commit [5]: 4b4e391a28b4dfeb69781c20190bffe8622d1907
fsck.cramfs:
Broken since first commit.
Commit: bf60993cf2442f67bd47bcfcf6bd49c7392c2ba1
mkswap:
Provide random uuid when completing --uuid argument.
partx:
Add --sector-size option. Fix also list of known partition types to
match with libblkid blkid_idinfo names. The fix is also applied to
manual page.
Commit: f8a4a0d4f2fd569252029bd004e24ee433b43fe8
Reference: git grep -A 4 blkid_idinfo libblkid/src/partitions | grep name
sfdisk:
Add --reoder, --delete, --mode-dataa, -no-tell-kernel, --wipe, and
--wipe-partitions options. In same go fix some option argument
completions.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2017-04-11 14:30:02 -05:00
|
|
|
fi
|
|
|
|
done
|
|
|
|
compopt -o nospace
|
|
|
|
COMPREPLY=( $(compgen -P "$prefix" -W "$OUTPUT" -S ',' -- "$realcur") )
|
|
|
|
return 0
|
|
|
|
;;
|
|
|
|
'-O'|'--backup-file')
|
2013-09-30 08:49:00 -05:00
|
|
|
local IFS=$'\n'
|
2013-03-23 11:18:37 -05:00
|
|
|
compopt -o filenames
|
|
|
|
COMPREPLY=( $(compgen -f -- $cur) )
|
|
|
|
return 0
|
2013-04-07 03:12:04 -05:00
|
|
|
;;
|
|
|
|
'-h'|'--help'|'-v'|'--version')
|
|
|
|
return 0
|
2013-03-23 11:18:37 -05:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
case $cur in
|
|
|
|
'=')
|
|
|
|
cur=${cur#=}
|
|
|
|
;;
|
|
|
|
-*)
|
2015-08-02 15:24:08 -05:00
|
|
|
OPTS="
|
|
|
|
--activate
|
|
|
|
--dump
|
|
|
|
--json
|
|
|
|
--show-geometry
|
2013-04-07 03:12:08 -05:00
|
|
|
--list
|
2015-07-28 08:54:07 -05:00
|
|
|
--list-free
|
bash-completion: update disk-utils
fdformat:
Add --from, --to, and --repair options.
Commit: e0402441a143533d33d3c450471b2cd655407d77
fdisk:
Add --output [1], --bytes [2], --wipe [3], --wipe-partition [4], and
remove --geom- from from --cylinders, --heads, --sector options [5].
Commit [1]: fff8ad5882308825a131c645e4d28bcaef943351
Commit [2]: 354f8cc8cf06de44656fb83705c57062d04d1565
Commit [3]: cb9a4b0033eca429689a403be2a192fe2842f2e9
Commit [4]: ba465623d84b9e330f248a477d078b5f280b7943
Commit [5]: 4b4e391a28b4dfeb69781c20190bffe8622d1907
fsck.cramfs:
Broken since first commit.
Commit: bf60993cf2442f67bd47bcfcf6bd49c7392c2ba1
mkswap:
Provide random uuid when completing --uuid argument.
partx:
Add --sector-size option. Fix also list of known partition types to
match with libblkid blkid_idinfo names. The fix is also applied to
manual page.
Commit: f8a4a0d4f2fd569252029bd004e24ee433b43fe8
Reference: git grep -A 4 blkid_idinfo libblkid/src/partitions | grep name
sfdisk:
Add --reoder, --delete, --mode-dataa, -no-tell-kernel, --wipe, and
--wipe-partitions options. In same go fix some option argument
completions.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2017-04-11 14:30:02 -05:00
|
|
|
--reorder
|
2015-08-02 15:24:08 -05:00
|
|
|
--show-size
|
2013-04-07 03:12:08 -05:00
|
|
|
--list-types
|
|
|
|
--verify
|
bash-completion: update disk-utils
fdformat:
Add --from, --to, and --repair options.
Commit: e0402441a143533d33d3c450471b2cd655407d77
fdisk:
Add --output [1], --bytes [2], --wipe [3], --wipe-partition [4], and
remove --geom- from from --cylinders, --heads, --sector options [5].
Commit [1]: fff8ad5882308825a131c645e4d28bcaef943351
Commit [2]: 354f8cc8cf06de44656fb83705c57062d04d1565
Commit [3]: cb9a4b0033eca429689a403be2a192fe2842f2e9
Commit [4]: ba465623d84b9e330f248a477d078b5f280b7943
Commit [5]: 4b4e391a28b4dfeb69781c20190bffe8622d1907
fsck.cramfs:
Broken since first commit.
Commit: bf60993cf2442f67bd47bcfcf6bd49c7392c2ba1
mkswap:
Provide random uuid when completing --uuid argument.
partx:
Add --sector-size option. Fix also list of known partition types to
match with libblkid blkid_idinfo names. The fix is also applied to
manual page.
Commit: f8a4a0d4f2fd569252029bd004e24ee433b43fe8
Reference: git grep -A 4 blkid_idinfo libblkid/src/partitions | grep name
sfdisk:
Add --reoder, --delete, --mode-dataa, -no-tell-kernel, --wipe, and
--wipe-partitions options. In same go fix some option argument
completions.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2017-04-11 14:30:02 -05:00
|
|
|
--delete
|
2015-08-02 15:24:08 -05:00
|
|
|
--part-label
|
|
|
|
--part-type
|
|
|
|
--part-uuid
|
|
|
|
--part-attrs
|
|
|
|
--append
|
|
|
|
--backup
|
|
|
|
--bytes
|
bash-completion: update disk-utils
fdformat:
Add --from, --to, and --repair options.
Commit: e0402441a143533d33d3c450471b2cd655407d77
fdisk:
Add --output [1], --bytes [2], --wipe [3], --wipe-partition [4], and
remove --geom- from from --cylinders, --heads, --sector options [5].
Commit [1]: fff8ad5882308825a131c645e4d28bcaef943351
Commit [2]: 354f8cc8cf06de44656fb83705c57062d04d1565
Commit [3]: cb9a4b0033eca429689a403be2a192fe2842f2e9
Commit [4]: ba465623d84b9e330f248a477d078b5f280b7943
Commit [5]: 4b4e391a28b4dfeb69781c20190bffe8622d1907
fsck.cramfs:
Broken since first commit.
Commit: bf60993cf2442f67bd47bcfcf6bd49c7392c2ba1
mkswap:
Provide random uuid when completing --uuid argument.
partx:
Add --sector-size option. Fix also list of known partition types to
match with libblkid blkid_idinfo names. The fix is also applied to
manual page.
Commit: f8a4a0d4f2fd569252029bd004e24ee433b43fe8
Reference: git grep -A 4 blkid_idinfo libblkid/src/partitions | grep name
sfdisk:
Add --reoder, --delete, --mode-dataa, -no-tell-kernel, --wipe, and
--wipe-partitions options. In same go fix some option argument
completions.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2017-04-11 14:30:02 -05:00
|
|
|
--move-data
|
2013-04-07 03:12:08 -05:00
|
|
|
--force
|
2015-08-02 15:24:08 -05:00
|
|
|
--color
|
|
|
|
--partno
|
|
|
|
--no-act
|
2013-03-23 11:18:37 -05:00
|
|
|
--no-reread
|
bash-completion: update disk-utils
fdformat:
Add --from, --to, and --repair options.
Commit: e0402441a143533d33d3c450471b2cd655407d77
fdisk:
Add --output [1], --bytes [2], --wipe [3], --wipe-partition [4], and
remove --geom- from from --cylinders, --heads, --sector options [5].
Commit [1]: fff8ad5882308825a131c645e4d28bcaef943351
Commit [2]: 354f8cc8cf06de44656fb83705c57062d04d1565
Commit [3]: cb9a4b0033eca429689a403be2a192fe2842f2e9
Commit [4]: ba465623d84b9e330f248a477d078b5f280b7943
Commit [5]: 4b4e391a28b4dfeb69781c20190bffe8622d1907
fsck.cramfs:
Broken since first commit.
Commit: bf60993cf2442f67bd47bcfcf6bd49c7392c2ba1
mkswap:
Provide random uuid when completing --uuid argument.
partx:
Add --sector-size option. Fix also list of known partition types to
match with libblkid blkid_idinfo names. The fix is also applied to
manual page.
Commit: f8a4a0d4f2fd569252029bd004e24ee433b43fe8
Reference: git grep -A 4 blkid_idinfo libblkid/src/partitions | grep name
sfdisk:
Add --reoder, --delete, --mode-dataa, -no-tell-kernel, --wipe, and
--wipe-partitions options. In same go fix some option argument
completions.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2017-04-11 14:30:02 -05:00
|
|
|
--no-tell-kernel
|
2015-08-02 15:24:08 -05:00
|
|
|
--backup-file
|
|
|
|
--output
|
2013-04-07 03:12:08 -05:00
|
|
|
--quiet
|
bash-completion: update disk-utils
fdformat:
Add --from, --to, and --repair options.
Commit: e0402441a143533d33d3c450471b2cd655407d77
fdisk:
Add --output [1], --bytes [2], --wipe [3], --wipe-partition [4], and
remove --geom- from from --cylinders, --heads, --sector options [5].
Commit [1]: fff8ad5882308825a131c645e4d28bcaef943351
Commit [2]: 354f8cc8cf06de44656fb83705c57062d04d1565
Commit [3]: cb9a4b0033eca429689a403be2a192fe2842f2e9
Commit [4]: ba465623d84b9e330f248a477d078b5f280b7943
Commit [5]: 4b4e391a28b4dfeb69781c20190bffe8622d1907
fsck.cramfs:
Broken since first commit.
Commit: bf60993cf2442f67bd47bcfcf6bd49c7392c2ba1
mkswap:
Provide random uuid when completing --uuid argument.
partx:
Add --sector-size option. Fix also list of known partition types to
match with libblkid blkid_idinfo names. The fix is also applied to
manual page.
Commit: f8a4a0d4f2fd569252029bd004e24ee433b43fe8
Reference: git grep -A 4 blkid_idinfo libblkid/src/partitions | grep name
sfdisk:
Add --reoder, --delete, --mode-dataa, -no-tell-kernel, --wipe, and
--wipe-partitions options. In same go fix some option argument
completions.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2017-04-11 14:30:02 -05:00
|
|
|
--wipe
|
|
|
|
--wipe-partitions
|
2015-08-02 15:24:08 -05:00
|
|
|
--label
|
|
|
|
--label-nested
|
|
|
|
--help
|
|
|
|
--version
|
|
|
|
"
|
2013-03-23 11:18:37 -05:00
|
|
|
COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
|
|
|
|
return 0
|
|
|
|
;;
|
|
|
|
esac
|
2019-09-19 08:40:13 -05:00
|
|
|
compopt -o bashdefault -o default
|
2014-10-26 17:07:08 -05:00
|
|
|
COMPREPLY=( $(compgen -W "$(lsblk -pnro name)" -- $cur) )
|
2013-03-23 11:18:37 -05:00
|
|
|
return 0
|
|
|
|
}
|
|
|
|
complete -F _sfdisk_module sfdisk
|