Bash functions required for optcomplete