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

Re: not autocompleting



On Wed, Jul 4, 2012 at 10:35 PM, Curt <curty@free.fr> wrote:
> On 2012-07-04, Camaleón <noelamac@gmail.com> wrote:
>>
>> Ah, you mean for "hidden" directories.
>>
>> For those I neither get the autocomplete when using OOo applications
>> (oowriter, oocalc...), though it works with the usual bash built-in tools
>> (e.g., "cat .th[tab]" → it does autocomplete).
>>
>> Not sure if this behaviour can be tweaked :-?
>
>
> curty@einstein:/etc$ complete -p | grep oocalc
> complete -o filenames -d -X '.[^./]*' -F _ooexp_ oocalc
>
> If I only knew what that meant!
>

The -X option's value excludes entries that begin with a dot from the
completion list.  I don't know why it is done this way, but changing
it is easy.  The lines printed by complete -p are actual bash builtin
command lines, that you can edit and run.

So just run this:

complete -o filenames -d -F _ooexp_ oocalc

and bash will now show files starting with "." when completing (You
can do similar things for the other OO commands).  For permanence, add
this line to your .bashrc after /etc/bash_completion is sourced, to
override whatever it does.

I'm too lazy to track down why the -X exclusion is being used.  There
might be good reasons for that.

>  Completion is implemented in the file /etc/bash_completion
>  New completion commands may be placed inside the directory
>  /etc/bash_completion.d
>  We can list all the current completion routines bound via "complete -p"
>
> http://www.debian-administration.org/articles/316
>

-- 
regards,
kushal


Reply to: