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 b072e96
Show file tree
Hide file tree
Showing 2 changed files with 27 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
2 changes: 2 additions & 0 deletions releng/release-notes-next/buildlog-parser-completion.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
A missing bash completion script for `mock-parse-buildlog` command [has
been added][PR#1353].

0 comments on commit b072e96

Please sign in to comment.