cmd-zet/internal/lib/ansi.go
Oliver Davies 3c7a1dc3c1 If the argument isn't an ID, use fzf to find an ID
Signed-off-by: Oliver Davies <oliver@oliverdavies.uk>
2025-09-30 22:51:49 +01:00

9 lines
162 B
Go

package lib
import "regexp"
var ansiRegex = regexp.MustCompile(`\x1b\[[0-9;]*m`)
func StripANSI(s string) string {
return ansiRegex.ReplaceAllString(s, "")
}