Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: completion: highlight matching part
- X-seq: zsh-users 13090
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: completion: highlight matching part
- Date: Sun, 03 Aug 2008 16:31:20 -0700
- In-reply-to: <080803103117.ZM26039@xxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20080801163301.GA3589@xxxxxxxxxxxxxxxx> <080802143558.ZM815@xxxxxxxxxxxxxxxxxxxxxx> <20080803111423.GA11247@xxxxxxxxxxxxxxxx> <080803103117.ZM26039@xxxxxxxxxxxxxxxxxxxxxx>
On Aug 3, 10:31am, Bart Schaefer wrote:
}
} There's also an erroneous ":" and extra "}"
} in what you say you ended up with. I think you need:
}
} highlights='${PREFIX:+=(#bi)($PREFIX:t)(?)*=00=$color[red]=$color[green];$color[bold]}'
} zstyle -e ':completion:*' list-colors \
} 'reply=( "$highlights" ${(s.:.)LS_COLORS} )'
Now it's my turn to have the quoting wrong. Need another '"..."' in there.
zstyle -e ':completion:*' list-colors \
'reply=( "'"$highlights"'" ${(s.:.)LS_COLORS} )'
} However, I suspect you think you want this:
}
} ${${(s.:.)LS_COLORS}//#(#b)\*(*)=(*)/'=(#bi)($PREFIX:t)(?)(#B)*('$match[1]')='$match[2]'=$color[red]=$color[green];$color[bold]=$color[cyan];$color[bold]'}
Messed that one up, too, I think. I miscounted the number of "=" as
compared to the number of subexpressions. I still think you ought to
leave "(#B)" out of there entirely, but the place for it is really after
$match[1] like this:
${${(s.:.)LS_COLORS}//#(#b)\*(*)=(*)/'=(#bi)($PREFIX:t)(?)*('$match[1]')(#B)='$match[2]'=$color[red]=$color[green];$color[bold]=$color[cyan];$color[bold]'}
Messages sorted by:
Reverse Date,
Date,
Thread,
Author