Add small utility 'lsee' to change lisp font-escapes to color changes (#399)
This commit is contained in:
18
scripts/lsee
Executable file
18
scripts/lsee
Executable file
@@ -0,0 +1,18 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Usage 'lsee file'
|
||||
# translates CR as newline
|
||||
# changes font-change control-characters ^F^x
|
||||
# to linux color escapes:
|
||||
# A regular
|
||||
# B bold / bright
|
||||
# C comment yellow
|
||||
# D big/bold red
|
||||
|
||||
export LANG=C
|
||||
tr '\r' '\n' < $1 | \
|
||||
sed -e 's//[0m/g' \
|
||||
-e 's//[31m/g'\
|
||||
-e 's//[1m/g' \
|
||||
-e 's//[33m/g'\
|
||||
-e 's//[32m/g'
|
||||
Reference in New Issue
Block a user