I have app-shells/zsh-completion-20060618 and gcc-config-1.3.16 installed. The problem is this: % gcc-config <press tab> ^[\[32\;01m^[\[0m i686-apple-darwin8-4.0.1 The first completion is obviously invalid. As for why this happens: % grep profile= ~/Gentoo/usr/share/zsh/site-functions/_gcc-config profile=(${(f)"$(_call_program gcc-installed gcc-config --list-profiles)"}) profile=${${profile/\[([^]]*)\]/}/\*} so first the leading [...] is stripped and then the trailing asterisk. However, these lines in gcc-config: % grep -b1 GOOD ~/Gentoo/usr/bin/gcc-config 13353- if [[ ${x} == ${CURRENT_NATIVE} ]] ; then 13398: x="${x} ${GOOD}*${NORMAL}" 13429- elif [[ -e ${GCC_ENV_D}/config-${target} ]] ; then cause the output of gcc-config to be colorized (the asterisk becomes green), and the escape sequence is not stripped. So either gcc-config should provide an option --no-color that zsh-completion could use or zsh-completion needs to filter non-whitespace next to the asterisk, too. PS: I run Gentoo/Alt (prefix) on macosx, but I assume this not a prefix-specific issue.
Created attachment 128149 [details, diff] patch against gcc-config
Created attachment 128150 [details, diff] patch against zsh-completion
I open a specific bug for the gcc-config
This bug should be closed by #204185
Closing it then :)