1. Make symbolic link into $BINDIR
as:
BINDIR=~/.local/bin/
ln -sv "$PWD/dump_comp_vars.bash" "${BINDIR:-/usr/local/bin/}"
2. Include dump_comp_vars.bash
at your completion script as:
. dump_comp_vars.bash
3. Call dump_comp_vars
function at your completion function as:
function __mycomp ()
{
local cur prev
_get_comp_words_by_ref -n : cur prev
# ...
readarray -t COMPREPLY < <(compgen -W "${COMPREPLY[*]@Q}" -- "$cur")
# ...
dump_comp_vars
}
MIT license.