Commit Graph

11 Commits

Author SHA1 Message Date
Sami Kerola ba5e7b7e52
bash-completion: update options before release
blkid: 5e91d5dd71 --no-part-details
lsblk: dc4662f0e7 --dedup
lsblk: 0bd05f5ee4 --merge
lscpu: 0e86bc8406 --caches
lscpu: 2011528bce --bytes

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2019-05-20 19:43:59 +01:00
Sami Kerola c6f0bdfecc bash-completion: fix few bash set -u issues
This is the same fix as in reference commit, and the same reason.  Just
correct few files missed earlier.

Reference: abbcec4fc9
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2018-04-06 13:03:38 +02:00
Sami Kerola c6b1d511d2
bash-completion: update misc-utils
fincore:

	Add RES column to --output completions.

	Commit: e4e8b57be2

findfs:

	Commit: 940817b736

logger:

	Add --socket-errors [1] and --tcp [2] options.

	Commit [1]: d77dc29e6e
	Commit [2]: 68265d070d

lsblk:

	Add HOTPLUG [1], SERIAL [2], and SUBSYSTEMS [3] output fields.  Add
	--json [4], --output-all [5], and --paths [6] options.

	Commit [1]: 483987c275
	Commit [2]: 460c7afb79
	Commit [3]: 7f14ee1b55
	Commit [4]: 4a102a4871
	Commit [5]: 1b4d2a4a4a
	Commit [6]: c7e76cd145

lslocks:

	Add --noinaccessible option.  Remove file argument completion, this
	command does not use that sort of command line input.

	Commit: f29bc6e1cc

mcookie:

	Add --max-size option.

	Commit: f7bac5731b

wipefs:

	Add --backup option.

	Commit: 7e658c15a2

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2017-04-17 18:18:10 +01:00
Boris Egorov 5e3da11b3e bash-completion: remove unused variables [shellcheck]
Fix shellcheck SC2034 warnings.

Signed-off-by: Boris Egorov <egorov@linux.com>
2015-06-08 12:09:54 +02:00
Boris Egorov b5b80e5a6d bash-completion: handle comma-separated options
This solution can become messy when you have too many options listed,
because it repeats all of them. For example, after invoking completion
with this input:

    $ partx --output END,SECTORS,SCHEME,START,

You got these completions:

    END,SECTORS,SCHEME,START,FLAGS,  END,SECTORS,SCHEME,START,NR,
    END,SECTORS,SCHEME,START,TYPE,
    END,SECTORS,SCHEME,START,NAME,   END,SECTORS,SCHEME,START,SIZE,
    END,SECTORS,SCHEME,START,UUID,

Nevertheless, it works even with numbers (listed options properly
excluded from completion). Try to invoke completion after
'chcpu --disable ' or 'lsblk --exclude ' to see it in action.

Few issues remained:

    * completion interrupts after encountering ':' in listed option,
    like in 'MAJ:MIN' in lsblk, losetup.
    * lscpu completion is broken: it inserts space after '--extended',
    but lscpu assumes there is no space after this option. It also
    doesn't complete '--parse' option.
    * some completion options are outdated (for example, lscpu MMHZ). We
    need to sync them with code. Fix for lscpu follows.

Signed-off-by: Boris Egorov <egorov@linux.com>
2015-06-08 12:09:48 +02:00
Ville Skyttä 396a6d7df5 bash-completion: Invoke actual commands to be completed, not basenames
Addresses partially: http://bugs.debian.org/769462
Signed-off-by: Ville Skyttä <ville.skytta@iki.fi>
2014-11-18 13:58:21 +01:00
Sami Kerola 53154dae39 bash-completion: stop being clever when listing block devices
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>
2014-10-31 10:39:00 +01:00
Karel Zak b8446f75d8 bash-completion: update fallocate, fstrim and lsblk
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-06-25 13:55:56 +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