Skip to content
Myr

Allow specifying 16 base ANSI colors by their names

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Close #2502

authored by Junegunn Choi · committed by Junegunn Choi · parent 7e5aa1e · Browse files · 3 files+57 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

3 files+57 added−1 removed

  • other:+57 added−1 removed

3 files+57 added−1 removed

modified:man/man1/fzf.1+17 added-1 removed
19 unmodified lines
20LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,21OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN22THE SOFTWARE.23..24.TH fzf 1 "May 2021" "fzf 0.27.1" "fzf - a command-line fuzzy finder"24.TH fzf 1 "May 2021" "fzf 0.27.2" "fzf - a command-line fuzzy finder"2526.SH NAME27fzf - a command-line fuzzy finder28
310 unmodified lines
339.B ANSI COLORS:340 \fB-1 \fRDefault terminal foreground/background color341 \fB \fR(or the original color of the text)342 \fB0 ~ 15 \fR16 base colors343 \fBblack\fR344 \fBred\fR345 \fBgreen\fR346 \fByellow\fR347 \fBblue\fR348 \fBmagenta\fR349 \fBcyan\fR350 \fBwhite\fR351 \fBbright-black\fR (gray | grey)352 \fBbright-red\fR353 \fBbright-green\fR354 \fBbright-yellow\fR355 \fBbright-blue\fR356 \fBbright-magenta\fR357 \fBbright-cyan\fR358 \fBbright-white\fR359 \fB16 ~ 255 \fRANSI 256 colors360 \fB#rrggbb \fR24-bit colors361362.B ANSI ATTRIBUTES: (Only applies to foreground colors)
631 unmodified lines
modified:src/options.go+32 added
668 unmodified lines
669 case "blink":670 cattr.Attr |= tui.Blink671 case "reverse":672 cattr.Attr |= tui.Reverse673 case "black":674 cattr.Color = tui.Color(0)675 case "red":676 cattr.Color = tui.Color(1)677 case "green":678 cattr.Color = tui.Color(2)679 case "yellow":680 cattr.Color = tui.Color(3)681 case "blue":682 cattr.Color = tui.Color(4)683 case "magenta":684 cattr.Color = tui.Color(5)685 case "cyan":686 cattr.Color = tui.Color(6)687 case "white":688 cattr.Color = tui.Color(7)689 case "bright-black", "gray", "grey":690 cattr.Color = tui.Color(8)691 case "bright-red":692 cattr.Color = tui.Color(9)693 case "bright-green":694 cattr.Color = tui.Color(10)695 case "bright-yellow":696 cattr.Color = tui.Color(11)697 case "bright-blue":698 cattr.Color = tui.Color(12)699 case "bright-magenta":700 cattr.Color = tui.Color(13)701 case "bright-cyan":702 cattr.Color = tui.Color(14)703 case "bright-white":704 cattr.Color = tui.Color(15)705 case "":706 default:707 if rrggbb.MatchString(component) {708 cattr.Color = tui.HexToColor(component)
958 unmodified lines
modified:CHANGELOG.md+8 added
1CHANGELOG2=========340.27.25------6- 16 base ANSI colors can be specified by their names7 ```sh8 fzf --color fg:3,fg+:119 fzf --color fg:yellow,fg+:bright-yellow10 ```11120.27.113------14- Added `unbind` action. In the following Ripgrep launcher example, you can15 use `unbind(reload)` to switch to fzf-only filtering mode.
1140 unmodified lines