List for cgit developers and users
 help / color / mirror / Atom feed
From: mailings at hupie.com (Ferry Huberts)
Subject: [PATCH v2 1/1] syntax-highlight: when the file has no extension,  assume text
Date: Wed, 04 Apr 2012 19:07:18 +0200	[thread overview]
Message-ID: <4F7C7FC6.9090402@hupie.com> (raw)
In-Reply-To: <20120404165840.GA2090@blizzard>



On 04-04-12 18:58, Lukas Fleischer wrote:
> On Wed, Apr 04, 2012 at 06:15:02PM +0200, Ferry Huberts wrote:
>> From: Ferry Huberts<ferry.huberts at pelagic.nl>
>>
>> There are 2 situations:
>> 1- empty extension: assuming text is better than highlight
>>     producing no output because of a missing argument.
>> 2- no extension at all: assuming text is better than setting
>>     the extension to the filename, which is what now happens.
>>
>> Signed-off-by: Ferry Huberts<ferry.huberts at pelagic.nl>
>> ---
>>   filters/syntax-highlighting.sh |    3 +++
>>   1 files changed, 3 insertions(+), 0 deletions(-)
>>
>> diff --git a/filters/syntax-highlighting.sh b/filters/syntax-highlighting.sh
>> index 5fcc9c9..8b09180 100755
>> --- a/filters/syntax-highlighting.sh
>> +++ b/filters/syntax-highlighting.sh
>> @@ -39,6 +39,9 @@
>>   BASENAME="$1"
>>   EXTENSION="${BASENAME##*.}"
>>
>> +[ "${BASENAME}" == "${EXTENSION}" ]&&  EXTENSION=txt
>
> There is no "==" in POSIX shell/test(1). This should probably be a
> single equal sign ("=").
>
>> +[ -z "${EXTENSION}" ]&&  EXTENSION=txt
>> +
>>   # map Makefile and Makefile.* to .mk
>>   [ "${BASENAME%%.*}" == "Makefile" ]&&  EXTENSION=mk
>>

it appears there is, or (if there is not) the line above also doesn't 
work (that line has been in since 56522eb, 19-11-2009)



-- 
Ferry Huberts




  reply	other threads:[~2012-04-04 17:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-04 16:15 mailings
2012-04-04 16:58 ` cgit
2012-04-04 17:07   ` mailings [this message]
2012-04-05  9:38     ` nobody
2012-04-05 10:04       ` mailings

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F7C7FC6.9090402@hupie.com \
    --to=cgit@lists.zx2c4.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).