use perl instead of sed -r to strip colors in test
`sed -r` is not present on some BSD based systems, including MacOSX Darwin. perl is standard pretty much everywhere, so this a more reliable way to test. Since this is only used for tests, any performance differences should not matter significantly.
This commit is contained in:
@@ -15,7 +15,7 @@ fi
|
||||
|
||||
# Strip color codes from a string
|
||||
strip_colors() {
|
||||
sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]//g"
|
||||
perl -pe 's/\e\[[\d;]*m//g'
|
||||
}
|
||||
|
||||
# Print space separated tab completion options
|
||||
|
||||
Reference in New Issue
Block a user