diff options
author | mboelen <michael@cisofy.com> | 2014-10-02 17:15:19 +0400 |
---|---|---|
committer | mboelen <michael@cisofy.com> | 2014-10-02 17:15:19 +0400 |
commit | 231582ac534f4608fbf3cd5056adcd65be547bb9 (patch) | |
tree | a4f59a6d192e27f9504f7f416ae7e8b645412272 /extras/bash_completion.d | |
parent | 52fe3b68ba8ca369ac9fc121c5f8746fa3983304 (diff) |
Added systemd service script and timer (as replacement for cronjob)
Diffstat (limited to 'extras/bash_completion.d')
-rw-r--r-- | extras/bash_completion.d/lynis | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/extras/bash_completion.d/lynis b/extras/bash_completion.d/lynis new file mode 100644 index 00000000..1492b032 --- /dev/null +++ b/extras/bash_completion.d/lynis @@ -0,0 +1,76 @@ +# bash completion for lynis + +# version 1.0.0 (22 September 2014) +# Michael Boelen <michael.boelen@cisofy.com> + +# lynis(8) completion +_lynis() +{ + local cur prev + # opts nodig nosig + + COMPREPLY=() + _get_comp_words_by_ref cur prev + + if [ $COMP_CWORD -eq 1 ]; then + # first parameter on line + case $cur in + -*) + COMPREPLY=( $( compgen -W '--check-all --help --info --version' -- "$cur" ) ) + ;; + *) + COMPREPLY=( $( compgen -W '--check-all --help --info --version' -- "$cur" ) ) + ;; + esac + + return 0 + fi + + case $prev in + --auditor) + COMPREPLY=( '"Mr. Auditor"' ) + return 0 + ;; + --check-update|--help|--info|--version) + # all other options are noop with this command + return 0 + ;; + --logfile) + COMPREPLY=( 'myfile.log' ) + return 0 + ;; + --plugin-dir) + _filedir -d + return 0 + ;; + --profile) + COMPREPLY=( 'default.prf' ) + return 0 + ;; + --tests) + COMPREPLY=( '"TEST-0001 TEST-0002 TEST-0003"' ) + return 0 + ;; + --tests-category) + COMPREPLY=( '"accounting authentication"' ) + return 0 + ;; + *) + COMPREPLY=( $( compgen -W ' \ + --auditor --cronjob --debug --quick --quiet --logfile --no-colors --no-log --pentest --reverse-colors \ + --tests --tests-category --upload --view-categories' -- "$cur" ) ) + ;; + esac + + return 0 +} + +complete -F _lynis lynis + +# Local variables: +# mode: shell-script +# sh-basic-offset: 4 +# sh-indent-comment: t +# indent-tabs-mode: nil +# End: +# ex: ts=4 sw=4 et filetype=sh |