summaryrefslogtreecommitdiffstats
path: root/bash-completion/swapon
Commit message (Collapse)AuthorAgeFilesLines
* bash-completion: add swapon specifiers to completionSami Kerola2018-05-281-3/+18
| | | | | | | No space after device name is not entirely right, but that's better than missing argument completions. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* swapon: add --output-all optionSami Kerola2018-05-031-0/+1
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* bash-completion: make completions to work when bash set -u is in useSami Kerola2017-07-151-1/+1
| | | | | | | | | | | | | | | User who want to avoid refering to none-existing variables got earlier the following error. $ set -u $ findmnt --output <tab>bash: OUTPUT: unbound variable Here is short explanation of this setting. $ help set -u Treat unset variables as an error when substituting. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* bash-completion: handle comma-separated optionsBoris Egorov2015-06-081-4/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* bash-completion: use swapon label and uuid listing supportSami Kerola2014-10-311-1/+1
| | | | | | | Simplifies the script, and makes swapoff to work for files when get requests by label or uuid. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* bash-completion: swapon: add options and fix argumentSami Kerola2013-04-091-4/+15
| | | | | | | | | The initial bash-completion missed swapon options -L and -U. Use of block device was proposed to be more appropriate than a path to a file. Requested-by: Karel Zak <kzak@redhat.com> References: http://marc.info/?l=util-linux-ng&m=136517310727426&w=2 Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* bash-completion: Don't offer short options where corresponding long one exists.Ville Skyttä2013-04-081-13/+13
| | | | | | | | | 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>
* bash-completion: Avoid some unnecessary subshells.Ville Skyttä2013-04-081-1/+1
| | | | Signed-off-by: Ville Skyttä <ville.skytta@iki.fi>
* bash-completion: Don't offer any more completions after help or version.Ville Skyttä2013-04-081-0/+3
| | | | Signed-off-by: Ville Skyttä <ville.skytta@iki.fi>
* bash-completion: rename shell-completion -> bash-completionKarel Zak2013-04-051-0/+48
Signed-off-by: Karel Zak <kzak@redhat.com>