From f4acb49ea148cdd899f7f29f1591c7bc853c2135 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 4 May 2024 03:03:18 +0200 Subject: Adding upstream version 1:2.12.0. Signed-off-by: Daniel Baumann --- completions/lastlog | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'completions/lastlog') diff --git a/completions/lastlog b/completions/lastlog index 214a174..8faf82b 100644 --- a/completions/lastlog +++ b/completions/lastlog @@ -1,25 +1,27 @@ # lastlog(8) completion -*- shell-script -*- -_lastlog() +_comp_cmd_lastlog() { - local cur prev words cword split - _init_completion -s || return + local cur prev words cword was_split comp_args + _comp_initialize -s -- "$@" || return + local noargopts='!(-*|*[btu]*)' + # shellcheck disable=SC2254 case $prev in - --before | --help | --time | -!(-*)@([bt]|h*)) + --before | --help | --time | -${noargopts}@([bt]|h*)) return ;; - --user | -!(-*)u) - COMPREPLY=($(compgen -u -- "$cur")) + --user | -${noargopts}u) + _comp_compgen -- -u return ;; esac - $split && return + [[ $was_split ]] && return - COMPREPLY=($(compgen -W '$(_parse_help "$1")' -- "$cur")) + _comp_compgen_help [[ ${COMPREPLY-} == *= ]] && compopt -o nospace } && - complete -F _lastlog lastlog + complete -F _comp_cmd_lastlog lastlog # ex: filetype=sh -- cgit v1.2.3