Shell: Rename hlt-viewer to highlight-gallery and fix global variable
parent
f22fa93f5d
commit
f16db91d2a
|
@ -93,11 +93,10 @@ termsupport () {
|
|||
}
|
||||
|
||||
if command -v highlight >/dev/null 2>&1; then
|
||||
hlt-viewer () {
|
||||
highlight-gallery () {
|
||||
local SAMPLE DUMMY
|
||||
|
||||
local usage ()
|
||||
{
|
||||
if [ $# -gt 0 ]; then
|
||||
cat<<EOF
|
||||
Usage: $1
|
||||
|
||||
|
@ -107,10 +106,6 @@ highlight is a tool for listing printing. This script displays a preview for
|
|||
every highlight's theme. Press ENTER to display next preview. Press anything
|
||||
else then ENTER to quit.
|
||||
EOF
|
||||
}
|
||||
|
||||
if [ $# -gt 0 ]; then
|
||||
usage "$0"
|
||||
return
|
||||
fi
|
||||
|
||||
|
@ -129,7 +124,7 @@ EOF
|
|||
)"
|
||||
|
||||
for i in $(highlight -w | grep -v "\s\|^$"); do
|
||||
echo "******************** $i ********************"
|
||||
echo "==> $i"
|
||||
highlight -S c -O xterm256 <(echo "$SAMPLE") -s "$i"
|
||||
read DUMMY
|
||||
if [ -n "$DUMMY" ]; then
|
||||
|
|
Loading…
Reference in New Issue