Commit Graph

9 Commits

Author SHA1 Message Date
Karel Zak 701f0385a0 mkswap: add --verbose, reduce extents check output
We do not need to provide details in the default output. It seems
better to hide it behind --verbose to be user-friendly.

Signed-off-by: Karel Zak <kzak@redhat.com>
2020-09-10 12:54:14 +02:00
Sami Kerola 5adb0c9066 bash-completion: release preparations
6e103c7690 blkzone: Add --force option
9cd88771ef fdisk: add --lock and LOCK_BLOCK_DEVICE
921ceaca31 wipefs: add --lock and LOCK_BLOCK_DEVICE
c3ef1268a0 sfdisk: add --lock and LOCK_BLOCK_DEVICE
b8671fe763 mkswap: add --lock and LOCK_BLOCK_DEVICE
ec8f712157 cfdisk: add --lock and LOCK_BLOCK_DEVICE
f2229320a9 fdisk: add --noauto-pt
7f1f0584c2 nsenter: add support for the time namespace
dd52c4fa01 lsirq: add -n option
ee5a160250 sfdisk: add --relocate command
99d78b2fef fdisk: add --list-details
65e27d545c sfdisk: add --disk-id to change disk UUID/ID
34fed3ff17 blkdiscard: use O_EXCL, add --force

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2020-06-15 11:35:40 +02:00
Kevin Locke 6ead91ce1e 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>
2019-09-19 08:16:32 -06:00
Kevin Locke 559888c873 bash-completion: Standardize fsck/mkfs file/device
Some of the fsck and mkfs commands complete differently than the others,
and differently than the desired behavior.[1]  Standardize on completing
with $(lsblk -pnro name):

* fsck: Don't complete completes on all block devices and device links
  under /dev immediately (which is excessive and prone to search
  problems).
* mkfs, mkfs.bfs: Don't complete "/path/to/file" literally.  I assume
  this was copy/pasted from example code, since it does not appear to be
  a valid argument unless it is a valid path, which is rare.
* fsck.cramfs, mkfs, mkfs.bfs, mkfs.cramfs, mkswap: Don't complete on
  all filenames initially.  The desired behavior is to complete
  filenames only if there are no canonical matches.[1]

Note: A subsequent commit will add the desired fallback behavior.

[1]: https://github.com/karelzak/util-linux/issues/842#issuecomment-523450243

Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
2019-09-19 07:27:31 -06:00
Sami Kerola 99d8ed0ac5
bash-completion: update disk-utils
fdformat:

	Add --from, --to, and --repair options.

	Commit: e0402441a1

fdisk:

	Add --output [1], --bytes [2], --wipe [3], --wipe-partition [4], and
	remove --geom- from from --cylinders, --heads, --sector options [5].

	Commit [1]: fff8ad5882
	Commit [2]: 354f8cc8cf
	Commit [3]: cb9a4b0033
	Commit [4]: ba465623d8
	Commit [5]: 4b4e391a28

fsck.cramfs:

	Broken since first commit.

	Commit: bf60993cf2

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: f8a4a0d4f2

	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-17 18:12:10 +01:00
Karel Zak ce3e6b15e2 bash-completion: use '\n' as IFS when ask for filenames
The bash completion for more(1) treats the space-separated pieces of
filenames as different files.

	$ touch foo\ bar
	$ more foo<TAB>
	bar foo

Reported-by: Ángel González <ingenit@zoho.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-30 15:49:00 +02:00
Ville Skyttä 0d5b9b8ab1 bash-completion: Don't offer short options where corresponding long one exists.
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>
2013-04-08 17:06:56 +02:00
Ville Skyttä d4f9b8d74c bash-completion: Don't offer any more completions after help or version.
Signed-off-by: Ville Skyttä <ville.skytta@iki.fi>
2013-04-08 17:06:52 +02:00
Karel Zak 20da58084a bash-completion: rename shell-completion -> bash-completion
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-04-05 14:58:07 +02:00