Bash completion for Linux (Bash 4+), targeting the ExpressVPN CLI executable
expressvpnctl.
For ExpressVPN client versions up to 3, Bash completions were included.
Created and tested against ExpressVPN client expressvpnctl version
5.0.1+11498.
- Completes top-level commands and global flags from
expressvpnctl --help. - Completes
set,get, andmonitorsubtypes and enum values. - Dynamically completes available regions at tab time via
expressvpnctl get regions. - Supports
connectandset regionwith dynamic regions andsmart. - Completes file arguments for
loginand split-tunnel app rules.
- Copy the completion file to the system bash-completion directory:
sudo install -m 0644 expressvpnctl /etc/bash_completion.d/expressvpnctl
- Start a new shell session (or
source /etc/bash_completion).
- Ensure the user completions directory exists:
mkdir -p ~/.local/share/bash-completion/completions - Copy the completion file:
install -m 0644 expressvpnctl ~/.local/share/bash-completion/completions/expressvpnctl - Start a new shell session (or
source ~/.bashrcif it loads bash-completion).