From f2621414ee5f2f601424c22f00e207903e3b6104 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 4 May 2024 03:03:18 +0200 Subject: Merging upstream version 1:2.12.0. Signed-off-by: Daniel Baumann --- completions/tune2fs | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) (limited to 'completions/tune2fs') diff --git a/completions/tune2fs b/completions/tune2fs index 66d629c..6d62aa2 100644 --- a/completions/tune2fs +++ b/completions/tune2fs @@ -1,32 +1,32 @@ # tune2fs(8) completion -*- shell-script -*- -_tune2fs() +_comp_cmd_tune2fs() { - local cur prev words cword - _init_completion || return + local cur prev words cword comp_args + _comp_initialize -- "$@" || return case $prev in -*[cCEiJLmrT]) return ;; -*e) - COMPREPLY=($(compgen -W 'continue remount-ro panic' -- "$cur")) + _comp_compgen -- -W 'continue remount-ro panic' return ;; -*g) - _gids - COMPREPLY=($(compgen -g -W '${COMPREPLY[@]}' -- "$cur")) + _comp_compgen_gids + _comp_compgen -a -- -g return ;; -*M) - _filedir -d + _comp_compgen_filedir -d return ;; -*o) local -a opts=(^debug ^bsdgroups ^user_xattr ^acl ^uid16 ^journal_data ^journal_data_ordered ^journal_data_writeback ^nobarrier ^block_validity ^discard ^nodelalloc) - COMPREPLY=($(compgen -W '${opts[@]} ${opts[@]#^}' -- "$cur")) + _comp_compgen -- -W '"${opts[@]}" "${opts[@]#^}"' return ;; -*O) @@ -34,28 +34,27 @@ _tune2fs() ^filetype ^flex_bg ^has_journal ^huge_file ^large_file ^metadata_csum ^mmp ^project ^quota ^read-only ^resize_inode ^sparse_super ^uninit_bg) - COMPREPLY=($(compgen -W '${opts[@]} ${opts[@]#^}' -- "$cur")) + _comp_compgen -- -W '"${opts[@]}" "${opts[@]#^}"' return ;; -*u) - _uids - COMPREPLY=($(compgen -u -W '${COMPREPLY[@]}' -- "$cur")) + _comp_compgen_uids + _comp_compgen -a -- -u return ;; -*U) - COMPREPLY=($(compgen -W 'clear random time' -- "$cur")) + _comp_compgen -- -W 'clear random time' return ;; esac if [[ $cur == -* ]]; then - COMPREPLY=($(compgen -W '$(_parse_usage "$1")' -- "$cur")) + _comp_compgen_usage return fi - cur=${cur:=/dev/} - _filedir + _comp_compgen -c "${cur:-/dev/}" filedir } && - complete -F _tune2fs tune2fs + complete -F _comp_cmd_tune2fs tune2fs # ex: filetype=sh -- cgit v1.2.3