nano-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Nano-devel] [PATCH] linter definitions


From: Mike Frysinger
Subject: Re: [Nano-devel] [PATCH] linter definitions
Date: Sun, 19 Apr 2015 01:37:02 -0400

On 18 Apr 2015 18:13, Mark Oteiza wrote:
> Mike Frysinger <address@hidden> writes:
> >> --- doc/syntax/sh.nanorc   (revision 5198)
> >> +++ doc/syntax/sh.nanorc   (working copy)
> >>
> >> +linter dash -n
> >
> > why not `sh -n` ?
> 
> At least here on Arch Linux, where sh is linked to bash, nano does not
> recognize the output.  I tried some other shells and guessed that dash
> would be a good choice.  I know at least debian uses dash as its sh:

you can't really assume any shell exists.  but i don't know what problem you're 
referring to wrt Arch/bash/sh.  seems to work fine for me:
# touch test.sh
# bash -n test.sh
# dash -n test.sh
# ln -sf dash /bin/sh
# sh -n test.sh
# ln -sf bash /bin/sh
# sh -n test.sh

# echo '(' > test.sh
# sh -n test.sh
test.sh: line 2: syntax error: unexpected end of file
# bash -n test.sh
test.sh: line 2: syntax error: unexpected end of file
# dash -n test.sh
test.sh: 2: test.sh: Syntax error: end of file unexpected
# ln -sf dash /bin/sh
# sh -n test.sh
test.sh: 2: test.sh: Syntax error: end of file unexpected
# ln -sf bash /bin/sh
# sh -n test.sh
test.sh: line 2: syntax error: unexpected end of file
-mike

Attachment: signature.asc
Description: Digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]