summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2018-12-18 14:47:12 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2018-12-18 14:53:58 +0100
commit0e89eb474d9a467df23965e77679e26a4d26ffca (patch)
tree5385c53171765063f4332437168280bf91ee6ac3
parente4abfc77c4b575ddc0baaf7f64146843f5da48a8 (diff)
parent2431ca22bcb5105c469d1c78984d9ba4c59a247c (diff)
downloadsystemd-0e89eb474d9a467df23965e77679e26a4d26ffca.tar.gz
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, ...".
-rw-r--r--shell-completion/bash/systemd-analyze11
1 files changed, 11 insertions, 0 deletions
diff --git a/shell-completion/bash/systemd-analyze b/shell-completion/bash/systemd-analyze
index 6c8c0c14c6..a4e506d9df 100644
--- a/shell-completion/bash/systemd-analyze
+++ b/shell-completion/bash/systemd-analyze
@@ -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