]> git.ipfire.org Git - thirdparty/util-linux.git/commit
bash-completion: Add fallback for symlinks/images
authorKevin Locke <kevin@kevinlocke.name>
Thu, 19 Sep 2019 13:40:13 +0000 (07:40 -0600)
committerKevin Locke <kevin@kevinlocke.name>
Thu, 19 Sep 2019 14:16:32 +0000 (08:16 -0600)
commit6ead91ce1e8431bec5b6f10c37b54a82f0be078a
tree0db3afb96d3157253bac9b96c9e3ac3e11dfcf71
parent559888c873a196c790137bbeee678dc5212c4430
bash-completion: Add fallback for symlinks/images

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>
13 files changed:
bash-completion/cfdisk
bash-completion/fdisk
bash-completion/fsck
bash-completion/fsck.cramfs
bash-completion/fsck.minix
bash-completion/mkfs
bash-completion/mkfs.bfs
bash-completion/mkfs.cramfs
bash-completion/mkfs.minix
bash-completion/mkswap
bash-completion/partx
bash-completion/sfdisk
bash-completion/wipefs