Create bash completion script to autocomplete paths after is-equal sign?

view story

http://unix.stackexchange.com – I want to create a bash completion script which recognises arguments of the form --arg and --some-arg=file. After reading this tutorial and some examples in /usr/share/bash_completion/completions/, I've written the following script (to save time at typing some flags with Chromium): _chromium() { local cur prev opts COMPREPLY=() cur="${COMP_WORDS[COMP_CWORD]}" prev="${COMP_WORDS[COMP_CWORD-1]}" # Some interesting options opts=" --disable-web-security --easy-off-store-extension-install --incognito --load-extension= --pack-extension= --pack-extension-key= --user-data-d (HowTos)