diff options
author | Miroslav Lichvar <mlichvar@redhat.com> | 2015-10-06 17:45:00 +0200 |
---|---|---|
committer | Ville Skyttä <ville.skytta@iki.fi> | 2015-10-07 00:26:05 +0300 |
commit | bc03de502c3d8391ee220a3a28ed964db8c5e73a (patch) | |
tree | f1e6831d2272ec9b8052d91711a5f942a9546f01 | |
parent | ef26136ea3f4fcf123c1a4af741be625fbac1a05 (diff) | |
download | bash-completion-bc03de502c3d8391ee220a3a28ed964db8c5e73a.tar.gz |
chronyc: Update help text parsing
In chrony-2.2 the chronyc help text formating was changed, the command
descriptions now may be on muliple lines and the commands are divided in
sections.
-rw-r--r-- | completions/chronyc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/completions/chronyc b/completions/chronyc index b95308f5..7a5f5f64 100644 --- a/completions/chronyc +++ b/completions/chronyc @@ -28,7 +28,7 @@ _chronyc() case $args in 0) COMPREPLY=( $( compgen -W "$( $1 help 2>/dev/null | \ - awk 'NR > 1 { sub("\\|", " ", $1); print $1 }' )" -- "$cur" ) ) + awk '!/(^ |: *$)/ { sub("\\|", " ", $1); print $1 }' )" -- "$cur" ) ) ;; 1) case $prev in |