Getting compgen to include slashes on directories when looking for files
I ran into the same problem. Here’s the workaround I’m using: Register the completion function with -o default, e.g., complete -o default -F _my_completion. When you want to complete a filename, just set COMPREPLY=() and let Readline take over (that’s what the -o default does). There’s a potential problem with this — you might be … Read more