At this stage, the code is known to work and has been thoroughly tested

This commit is contained in:
Jason Thistlethwaite
2026-04-27 22:24:04 +00:00
parent a11fa3b142
commit 16feb51b12
15 changed files with 2899 additions and 0 deletions
+34
View File
@@ -0,0 +1,34 @@
# Source this file in bash before using it:
# source <(./voipms-cli.php completion bash)
#
# To make it persistent for this project, add that line to your shell profile
# or write this output to a file loaded by bash-completion.
_voipms_cli()
{
local cur prev commands
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}"
commands="cdr completion e911Info e911Validate getBalance getCDR getCallAccounts getCallBilling getCallRecording getCallRecordings getCallTypes getDIDsInfo getFaxMessagePDF getFaxMessages getForwardings getIP getLNPList getLNPStatus getMMS getPhonebook getRates getRegistrationStatus getSMS getServersInfo getSubAccounts getTerminationRates getTransactionHistory getVoicemailSetups help list sendCallRecordingEmail sendFaxMessage sendMMS sendSMS setDIDInfo setDIDRouting setForwarding setPhonebook setSubAccount"
if [[ ${COMP_CWORD} -eq 1 ]]; then
COMPREPLY=( $(compgen -W "${commands}" -- "${cur}") )
return 0
fi
case "${prev}" in
--format)
COMPREPLY=( $(compgen -W "pretty json raw" -- "${cur}") )
return 0
;;
--username|--password|--endpoint|--param)
return 0
;;
esac
if [[ "${cur}" == --* ]]; then
COMPREPLY=( $(compgen -W "--username --password --endpoint --format --param --dry-run" -- "${cur}") )
return 0
fi
}
complete -o default -F _voipms_cli voipms-cli.php ./voipms-cli.php