Skip to content

BashCommandCompletion

Vitalii Koshura edited this page Jul 15, 2024 · 4 revisions

Command completion for boinc and boinccmd

The BASH shell has a useful facility to complete commands when you press [Tab]. There is a script which goes a bit further and lets BASH complete boinc's and boinccmd's commands and options.

For example if you type boinccmd --get_[Tab](Tab) it gives you all commands which begin with --get_:

~$ boinccmd --get_
--get_cc_status            --get_project_status
--get_disk_usage           --get_proxy_settings
--get_file_transfers       --get_results
--get_host_info            --get_screensaver_mode
--get_messages             --get_simple_gui_info
--get_project_config       --get_state
--get_project_config_poll

If you now press p and then [Tab](Tab) again the selection is reduced to:

~$ boinccmd --get_pro
--get_project_config       --get_project_status
--get_project_config_poll  --get_proxy_settings

and so on. The script also completes host names after the --host option.

To use this command completion, save this script on a file (e.g. boinc.bash) and source it in bash:

~$ source boinc.bash
Clone this wiki locally