Skip to content

Commit

Permalink
bash-completion: add mock-parse-buildlog
Browse files Browse the repository at this point in the history
  • Loading branch information
pastalian committed Mar 31, 2024
1 parent 71a8580 commit 8e1faf5
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions mock/etc/bash_completion.d/mock
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,31 @@ _mock()
} &&
complete -F _mock mock mock.py

_mock_parse_buildlog()
{
local cur prev cword split
_init_completion -s || return

case "$prev" in
-h|--help)
# no further arguments are accepted after the above arguments
return
;;
-p|--path)
_filedir
return
;;
esac

$split && return

if [[ $cword -eq 1 ]] ; then
COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) )
[[ $COMPREPLY == *= ]] && compopt -o nospace
fi
} &&
complete -F _mock_parse_buildlog mock-parse-buildlog mock-parse-buildlog.py

# Local variables:
# mode: shell-script
# sh-basic-offset: 4
Expand Down

0 comments on commit 8e1faf5

Please sign in to comment.