mirror of
https://codeberg.org/scip/tablizer.git
synced 2025-12-17 04:30:56 +01:00
fixed -X output in combination with -c
This commit is contained in:
@@ -17,6 +17,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
package lib
|
||||
|
||||
import (
|
||||
"github.com/gookit/color"
|
||||
//"github.com/xo/terminfo"
|
||||
)
|
||||
|
||||
var (
|
||||
// command line flags
|
||||
Debug bool
|
||||
@@ -35,11 +40,30 @@ var (
|
||||
InvertMatch bool
|
||||
Pattern string
|
||||
|
||||
// FIXME: make configurable somehow, config file or ENV
|
||||
MatchFG string = "black" // see https://github.com/gookit/color
|
||||
MatchBG string = "green"
|
||||
/*
|
||||
FIXME: make configurable somehow, config file or ENV
|
||||
see https://github.com/gookit/color will be set by
|
||||
io.ProcessFiles() according to currently supported
|
||||
color mode.
|
||||
*/
|
||||
MatchFG string
|
||||
MatchBG string
|
||||
NoColor bool
|
||||
|
||||
// colors to be used per supported color mode
|
||||
Colors = map[color.Level]map[string]string{
|
||||
color.Level16: map[string]string{
|
||||
"bg": "green", "fg": "black",
|
||||
},
|
||||
color.Level256: map[string]string{
|
||||
"bg": "lightGreen", "fg": "black",
|
||||
},
|
||||
color.LevelRgb: map[string]string{
|
||||
// FIXME: maybe use something nicer
|
||||
"bg": "lightGreen", "fg": "black",
|
||||
},
|
||||
}
|
||||
|
||||
// used for validation
|
||||
validOutputmodes = "(orgtbl|markdown|extended|ascii)"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user