From mboxrd@z Thu Jan 1 00:00:00 1970 From: mailings at hupie.com (Ferry Huberts) Date: Thu, 05 Apr 2012 12:04:58 +0200 Subject: [PATCH v2 1/1] syntax-highlight: when the file has no extension, assume text In-Reply-To: <4F7D6827.80107@nowhere.ws> References: <1333556102-11560-1-git-send-email-mailings@hupie.com> <20120404165840.GA2090@blizzard> <4F7C7FC6.9090402@hupie.com> <4F7D6827.80107@nowhere.ws> Message-ID: <4F7D6E4A.3030008@hupie.com> On 05-04-12 11:38, Christian Franke wrote: > On 04/04/2012 07:07 PM, Ferry Huberts wrote: >> On 04-04-12 18:58, Lukas Fleischer wrote: >>> There is no "==" in POSIX shell/test(1). This should probably be a >>> single equal sign ("="). > >> 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) > > $ cat<< EOF> test.sh > if [ "magic" == "\$1" ]; then > echo "Argument is magic." > fi > EOF > $ /bin/dash test.sh > [: 3: magic: unexpected operator > $ /bin/dash test.sh magic > [: 3: magic: unexpected operator > $ sed -e 's/==/=/' -i test.sh > $ /bin/dash test.sh > $ /bin/dash test.sh magic > Argument is magic. > $ /bin/bash test.sh > $ /bin/bash test.sh magic > Argument is magic. > > dash is a posix compatible shell. As most people use bash as their > shell, incompatibilies with posix shell often go unnoticed for a long > time. A script should however either specify /bin/bash as interpreter > or adhere to the shell language given in POSIX. > > Best Regards, > Christian ok, thanks for the demo I'll post a follow-up patch that fixes the POSIX issues -- Ferry Huberts