mirror of
https://github.com/Dasharo/systemd.git
synced 2026-03-06 15:02:31 -08:00
Merge pull request #10221 from lucaswerkmeister/bash-completion
Merged locally to resolve a conflict. The redirection of error is required to suppress "# Not showing unlisted system calls, ...".
This commit is contained in:
@@ -35,6 +35,15 @@ __get_services() {
|
||||
{ while read -r a b c; do [[ $b == "loaded" ]]; echo " $a"; done }
|
||||
}
|
||||
|
||||
__get_syscall_sets() {
|
||||
local line
|
||||
systemd-analyze syscall-filter --no-pager | while IFS= read -r line; do
|
||||
if [[ $line == @* ]]; then
|
||||
printf '%s\n' "$line"
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
_systemd_analyze() {
|
||||
local i verb comps mode
|
||||
local cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]}
|
||||
@@ -127,6 +136,8 @@ _systemd_analyze() {
|
||||
elif __contains_word "$verb" ${VERBS[SECCOMP_FILTER]}; then
|
||||
if [[ $cur = -* ]]; then
|
||||
comps='--help --version --no-pager'
|
||||
else
|
||||
comps=$( __get_syscall_sets )
|
||||
fi
|
||||
|
||||
elif __contains_word "$verb" ${VERBS[VERIFY]}; then
|
||||
|
||||
Reference in New Issue
Block a user