August 20, 2021

Client bash completion

Bash completion is a last minute addition to the upcoming 0.4.0 release, adding shell-completion to all wireleap commands, sub-commands, option flags, as well as exec and config circuit.whitelist.

If you’re reading this prior to the 0.4.0 release, you can grab the completion script here. When 0.4.0 is released, it will be bundled and unpacked on init or upgrade.

To enable completion, add the following line to your $HOME/.bashrc or similar location.

[ -e "$HOME/wireleap/completion.bash" ] && source $HOME/wireleap/completion.bash

Opening a new shell will automatically source the script. Once sourced, hitting TAB will auto-complete…

$ wireleap <TAB>
config      import      intercept   restart     start       tun
exec        info        log         rollback    status      upgrade
help        init        reload      servicekey  stop        version

$ wireleap st<TAB>
start   status   stop

$ wireleap tun <TAB>
log     restart  start    status   stop

$ wireleap exec <TAB>
chromium-browser  firefox           google-chrome
curl              git               surf

$ wireleap config <TAB>
accesskey.use_on_demand  address.tun              contract
address.h2c              circuit.hops             timeout
address.socks            circuit.whitelist

$ wireleap config circuit.whitelist <TAB>
...list of relays