We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 00393b2 commit 9024645Copy full SHA for 9024645
vcgencmd/CMakeLists.txt
@@ -8,3 +8,4 @@ project(vcgencmd)
8
add_executable(vcgencmd vcgencmd.c)
9
install(TARGETS vcgencmd RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
10
install(FILES vcgencmd.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
11
+install(FILES vcgencmd-completion.bash RENAME vcgencmd DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/bash-completion/completions")
vcgencmd/vcgencmd-completion.bash
@@ -0,0 +1,11 @@
1
+_vcgencmd() {
2
+ local cur prev words cword split
3
+ _init_completion -s || return
4
+ if ! ((cword == 1)); then
5
+ return
6
+ fi
7
+ local cmds=$(vcgencmd commands | sed 's/^.*=//;s/[",]//g')
+ COMPREPLY+=($(compgen -W "$cmds" -- $cur))
+}
+
+complete -F _vcgencmd vcgencmd
0 commit comments