]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
lsclocks: improve dynamic clocks docs and completion
authorThomas Weißschuh <thomas@t-8ch.de>
Mon, 31 Jul 2023 15:49:07 +0000 (17:49 +0200)
committerThomas Weißschuh <thomas@t-8ch.de>
Mon, 31 Jul 2023 15:49:07 +0000 (17:49 +0200)
Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
bash-completion/lsclocks
misc-utils/lsclocks.1.adoc

index 6048323c9524723ccb424459612c7034e5b03bc1..72e6d23bf0872f90bd71ca1bac015b88f2211b2f 100644 (file)
@@ -26,6 +26,11 @@ _lsclocks_module()
                        COMPREPLY=( $(compgen -W "$clocks" -- "$cur") )
                        return 0
                        ;;
+               '-d'|'--dynamic-clock')
+                       clocks="$(echo /dev/ptp*)"
+                       COMPREPLY=( $(compgen -o filenames -W "$clocks" -- "$cur") )
+                       return 0
+                       ;;
                '-h'|'--help'|'-V'|'--version')
                        return 0
                        ;;
@@ -38,6 +43,7 @@ _lsclocks_module()
                                --output-all
                                --raw
                                --time
+                               --dynamic-clock
                                --help
                                --version"
                        COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
index 90497fba525fd26b1e88b7ddf5d467cdee8b05ac..31d565b3de2b2af3b48d5e9ebf1581a74c732930 100644 (file)
@@ -47,6 +47,7 @@ Do not try to discover dynamic clocks.
 
 *-d*, *--dynamic-clock* _path_
 Also display specified dynamic clock.
+Can be specified multiple times.
 
 include::man-common/help-version.adoc[]