From: Zbigniew Jędrzejewski-Szmek Date: Tue, 18 Dec 2018 13:47:12 +0000 (+0100) Subject: Merge pull request #10221 from lucaswerkmeister/bash-completion X-Git-Tag: v240~25 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0e89eb474d9a467df23965e77679e26a4d26ffca;p=thirdparty%2Fsystemd.git 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, ...". --- 0e89eb474d9a467df23965e77679e26a4d26ffca diff --cc shell-completion/bash/systemd-analyze index 6c8c0c14c66,c650940bcf0..a4e506d9df2 --- a/shell-completion/bash/systemd-analyze +++ b/shell-completion/bash/systemd-analyze @@@ -30,13 -30,17 +30,22 @@@ __get_machines() machinectl list --no-legend --no-pager | { while read a b; do echo " $a"; done; }; } +__get_services() { + systemctl list-units --no-legend --no-pager -t service --all $1 | \ + { 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 + local i verb comps mode local cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]} local -A OPTS=(