Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

No Color for Bash Completion Results

3 views
Skip to first unread message

Roger

unread,
Feb 5, 2011, 2:35:04 PM2/5/11
to bug-...@gnu.org
When using bash completion on files within local folder, ie. "$ ls f<tab>"
showing results for files starting with char "f" -- or any char(s) you may
specify, results are not provided in color when bash, terminal and ls are
configured for using color.

I do believe, results for bash completion on files were at one time in color.

To further troubleshoot, I removed /etc/bash/bashrc and $HOME/.bashrc and only
enabling related color commands.

I have tracked this down to the call:

compgen -d -- "$quoted"

(Give or take some commands as I found this by using strace/ltrace or grepping
the files belonging to bash/bash-completion packages.)

Doing something like "compgen -d |ls --color" does provide color, but is likely
not proper. I believe compgen is provided by bash and not bash-completion.


Using the following packages:
=app-shells/bash-4.1_p9
=app-shells/bash-completion-1.2
=app-shells/gentoo-bashcomp-20101217

Using both rxvt-unicode and framebuffer console.

Grepping around, I can see no references to anything color related when dealing
with compgen or $COMPREPLY. I did trace the "ls" (core-utils) to
"/usr/share/bash-completion/base" of bash-completion.

Any ideas?


--
Roger
http://rogerx.freeshell.org/

Dennis Williamson

unread,
Feb 5, 2011, 2:58:39 PM2/5/11
to Roger, bug-...@gnu.org

Zsh does that and fish does match highlighting in color. I don't
remember ever seeing Bash do it, though.

Roger

unread,
Feb 5, 2011, 4:11:48 PM2/5/11
to Dennis Williamson, bug-...@gnu.org
> On Sat, Feb 05, 2011 at 01:58:39PM -0600, Dennis Williamson wrote:
>On Sat, Feb 5, 2011 at 1:35 PM, Roger <roger...@gmail.com> wrote:
>> When using bash completion on files within local folder, ie. "$ ls f<tab>"
>> showing results for files starting with char "f" -- or any char(s) you may
>> specify, results are not provided in color when bash, terminal and ls are
>> configured for using color.
>>
>> I do believe, results for bash completion on files were at one time in color.

>Zsh does that and fish does match highlighting in color. I don't


>remember ever seeing Bash do it, though.

OK. Maybe not then. But thinking on it, maybe I was using an incantation of
ZSH at one time using "$" or "#" for the prompt.

Or, maybe the command completion files was hacked to pipe to 'ls --color'.

<shrugs>

--
Roger
http://rogerx.freeshell.org/

0 new messages