@@ -106,6 +106,24 @@ func parsePickerOutput(s string, numRows int) (key string, rowIdx int, err error
106106 return keyLine , rowIdx , nil
107107}
108108
109+ // build an fzf --color spec that matches the CLI's fang color scheme:
110+ // the table column header color is reused for accents (prompt, pointer,
111+ // matches, etc.) and the comment color for info text. base scheme
112+ // follows the detected terminal background.
113+ func pickerColorSpec () string {
114+ cs := fangColorScheme ()
115+ base := "dark"
116+ if ! isDarkBackground () {
117+ base = "light"
118+ }
119+ accent := hexColor (cs .Title )
120+ dim := hexColor (cs .Comment )
121+ return fmt .Sprintf (
122+ "%s,header:%s,prompt:%s,pointer:%s,marker:%s,spinner:%s,hl:%s,hl+:%s,info:%s" ,
123+ base , accent , accent , accent , accent , accent , accent , accent , dim ,
124+ )
125+ }
126+
109127func renderPickerHeader (bindings []pickBinding ) string {
110128 parts := make ([]string , len (bindings ))
111129 for i , b := range bindings {
@@ -135,6 +153,7 @@ func runPicker(headers []string, rows [][]string, bindings []pickBinding) error
135153 "--with-nth" , "2.." ,
136154 "--header" , renderPickerHeader (bindings ),
137155 "--header-first" ,
156+ "--color" , pickerColorSpec (),
138157 }
139158
140159 expect := make ([]string , 0 , len (bindings )- 1 )
0 commit comments