[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Temporarily change completion options

From: Mika Fischer
Subject: Temporarily change completion options
Date: Mon, 17 Mar 2008 14:14:03 +0100
User-agent: Mutt/1.5.17+20080114 (2008-01-14)


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!


reply via email to

[Prev in Thread] Current Thread [Next in Thread]