From bc03de502c3d8391ee220a3a28ed964db8c5e73a Mon Sep 17 00:00:00 2001 From: Miroslav Lichvar Date: Tue, 6 Oct 2015 17:45:00 +0200 Subject: 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. --- completions/chronyc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v1.2.1