diff options
Diffstat (limited to 'completions/lastlog')
-rw-r--r-- | completions/lastlog | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/completions/lastlog b/completions/lastlog new file mode 100644 index 00000000..8663afd7 --- /dev/null +++ b/completions/lastlog @@ -0,0 +1,28 @@ +# lastlog(8) completion -*- shell-script -*- + +_lastlog() +{ + local cur prev words cword split + _init_completion -s || return + + case $prev in + -b|--before|-h|--help|-t|--time) + return 0 + ;; + -u|--user) + COMPREPLY=( $( compgen -u -- "$cur" ) ) + return 0 + ;; + esac + + $split && return 0 + + if [[ "$cur" == -* ]]; then + COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) ) + [[ $COMPREPLY == *= ]] && compopt -o nospace + return 0 + fi +} && +complete -F _lastlog lastlog + +# ex: ts=4 sw=4 et filetype=sh |