mirror of
https://github.com/Matir/skel.git
synced 2026-05-25 21:19:09 -07:00
Cleanup
This commit is contained in:
@@ -1,8 +1,20 @@
|
||||
test -f /usr/share/source-highlight/src-hilite-lesspipe.sh && \
|
||||
# Find src-hilite-lesspipe.sh
|
||||
_SRCHILITE=""
|
||||
for _p in /usr/share/source-highlight/src-hilite-lesspipe.sh /opt/homebrew/bin/src-hilite-lesspipe.sh /usr/local/bin/src-hilite-lesspipe.sh ; do
|
||||
if [ -f "$_p" ] ; then
|
||||
_SRCHILITE="$_p"
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
if [ -n "$_SRCHILITE" ] ; then
|
||||
function srcless {
|
||||
if [ $# -ne 1 ] ; then
|
||||
echo "$0 <what>" > /dev/stderr
|
||||
echo "Usage: srcless <file>" > /dev/stderr
|
||||
return 1
|
||||
fi
|
||||
/usr/share/source-highlight/src-hilite-lesspipe.sh $1 | less -R
|
||||
"$_SRCHILITE" "$1" | less -R
|
||||
}
|
||||
fi
|
||||
|
||||
unset _SRCHILITE _p
|
||||
|
||||
Reference in New Issue
Block a user