mirror of
https://codeberg.org/scip/tablizer.git
synced 2026-02-04 02:20:56 +01:00
colorize-output using regexes, refactor line colorization (#49)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright © 2022-2025 Thomas von Dein
|
||||
Copyright © 2022-2026 Thomas von Dein
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -95,6 +95,7 @@ func Execute() {
|
||||
conf.PrepareCustomHeaders(headers)
|
||||
|
||||
wrapE(conf.PrepareFilters())
|
||||
wrapE(conf.PrepareColorizers())
|
||||
|
||||
conf.DetermineColormode()
|
||||
conf.ApplyDefaults()
|
||||
@@ -191,6 +192,8 @@ func Execute() {
|
||||
"filter", "F", nil, "Filter by field (field=regexp || field!=regexp)")
|
||||
rootCmd.PersistentFlags().StringArrayVarP(&conf.Transposers,
|
||||
"regex-transposer", "R", nil, "apply /search/replace/ regexp to fields given in -T")
|
||||
rootCmd.PersistentFlags().StringArrayVarP(&conf.Colorizers,
|
||||
"regex-colorizer", "K", nil, "apply /search/color[:background]/ to the whole output")
|
||||
|
||||
// input
|
||||
rootCmd.PersistentFlags().StringVarP(&conf.InputFile, "read-file", "r", "",
|
||||
|
||||
Reference in New Issue
Block a user