From mboxrd@z Thu Jan 1 00:00:00 1970 From: mailings at hupie.com (Ferry Huberts) Date: Wed, 4 Apr 2012 18:05:55 +0200 Subject: [PATCH v1 1/1] syntax-highlight: when the file has no extension, assume text Message-ID: <1333555555-9873-1-git-send-email-mailings@hupie.com> From: Ferry Huberts Better than setting the extension to the filename, which is what now happens. Signed-off-by: Ferry Huberts --- filters/syntax-highlighting.sh | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/filters/syntax-highlighting.sh b/filters/syntax-highlighting.sh index 5fcc9c9..fa597b8 100755 --- a/filters/syntax-highlighting.sh +++ b/filters/syntax-highlighting.sh @@ -39,6 +39,11 @@ BASENAME="$1" EXTENSION="${BASENAME##*.}" +if [ "${BASENAME}" == "${EXTENSION}" ]; then + # the file has no extension, assume text + EXTENSION="txt" +fi + # map Makefile and Makefile.* to .mk [ "${BASENAME%%.*}" == "Makefile" ] && EXTENSION=mk -- 1.7.7.6