Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bash-completion: add mock-parse-buildlog #1353

Merged
merged 1 commit into from
Apr 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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].
Loading