bug-bash
[Top][All Lists]
Advanced

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

compopt +o


From: Freddy Vulto
Subject: compopt +o
Date: Fri, 2 Oct 2009 19:40:43 +0200

Version: bash-4.0.33

I'm trying to disable completion options from within a completion, but
I can't get `compopt +o <option>' to work.

Steps to reproduce:

1.  Define functions/completions a, b, c & d:

    _a() { COMPREPLY=(foo=); }
    complete -F _a a
    _b() { COMPREPLY=(foo=); }
    complete -o filenames -F _b b
    _c() { compopt -o filenames; COMPREPLY=(foo=); }
    complete -F _c c
    _d() { compopt +o filenames; COMPREPLY=(foo=); }
    complete -o filenames -F _d d

2.  Complete a, b, c & d.  The option `-o filenames' escapes the `=' and I can't
    disable it (d), although enabling it goes all right (c):

    $ a <TAB>foo= ^C   # Ok.  Reference with -o filenames disabled
    $ b <TAB>foo\= ^C  # OK.  Reference with -o filenames enabled
    $ c <TAB>foo\= ^C  # OK
    $ d <TAB>foo\= ^C  # Expected foo= (-o filenames disabled)


Regards,

Freddy Vulto
http://fvue.nl




reply via email to

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