Hi, I'm currently working on the bash-completion package for Debian/Ubuntu.
I'd like to know if it is possible to change the options of the programable completion within the completion function. An example would be to allow environment variables in place of filenames. But if I set -o filenames, the $ will be escaped and if I don't set it then other things like & won't be escaped. Another example would be java completion. There the first argument should be a class (foo.bar.class). But the further arguments should be treated as filenames. Since bash does not see . as a path separator I have to use -o nospace to make the first argument work but this is inconvenient for the filename arguments. It would be very convenient if the completion function could alter the options based on its understanding of the current command line. Setting the options globally for a command means that the same options apply to all arguments, which is often very inconvenient. If there is a way to do this, or a workaround for problems of this kind, I'd be glad for any pointers! Regards, Mika