[prev in list] [next in list] [prev in thread] [next in thread] 

List:       cgit
Subject:    [PATCH v2 1/1] syntax-highlight: when the file has no extension,  assume text
From:       mailings () hupie ! com (Ferry Huberts)
Date:       2012-04-05 10:04:58
Message-ID: 4F7D6E4A.3030008 () hupie ! com
[Download RAW message or body]



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



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic