For commands which support operating on files (i.e. disk images), it is
desirable for bash-completion to complete matching file names. It is
also desirable to complete on block device symlinks (e.g. under
/dev/disk). To complete common use cases, often on canonical device
names, continue to try completion using canonical device names, then
fall back to matching any file incrementally as Bash does by default.[1]
[1]: https://github.com/karelzak/util-linux/issues/842#issuecomment-523450243
Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
uuidgen: Add hash-based UUIDs to bash-completion. These were added in
commit c6f1ec68a8.
wipefs: Command started to use libsmartcols, and it got some new options.
Commit d9921b2a12.
rename: New option was added in commit fabb90676a.
tunelp: The --trust-irq was removed it being years broken. Commit
d52eb4bd90.
setpriv: Add --ambient-caps option from commit 0c92194eee.
In same go fix 'bash set -u' issue, that is the same as mentioned commit
abbcec4fc9.
hwclock: For some reason --get has always been missing from this file.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Various commands such as blkid, cfdisk, fdisk, delpart, and so on listed
only partitions and missed for example disks and volume groups. The
right thing to do is to list all block devices in all for all commands
performing operations with them. This might occasionally list unexpected
devices that I think is lesser bad than missing some.
Addresses: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=764488
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Users who know the short options can just hit the short option instead
of tab, and it's not likely that it would be helpful to present a list
of single character options to users who don't know them, doing so
just unnecessarily trashes the list of suggestions.
Signed-off-by: Ville Skyttä <ville.skytta@iki.fi>