On Feb 28, 2013, at 19:25 , Doug McNutt <[email protected]> wrote:

> At 15:10 -0800 2/28/13, gshenaut wrote:
>> BBEdit support for shell (i.e., POSIX shell syntax) is almost completely 
>> lacking.
...
> What ? ?  ?
> 
> Have you even tried using a BBEdit worksheet? You get to specify just which 
> shell you want. Even my favorite, tcsh,

You didn't understand my question. Even in shell worksheets, the syntax module 
used is still the builtin “Unix Shell Script” module, which is basically 
ignorant of shell syntax, and which therefore doesn't support standard 
programmer's editing capabilities such as being able to navigate among 
functions, automatic code folding, and even differentially highlighting shell 
keywords versus non-shell material such as external commands.

In any case, no, I don't use shell worksheets, I prefer working directly in the 
command line, or writing scripts called from the command line. (My habits in 
this regard were already firmly established before 1980. It's been hard enough 
to branch away from vi, you'll pry my command line from my cold, dead fingers.)

Here's a speculation: the standard programmer's editor enhancements such as 
those I mentioned above might not be very convenient in a dynamic environment 
such as a shell worksheet. This could account for the stripped-down nature of 
the Unix Shell Script spec. However, if you are like me, and write many 
complicated shell scripts that are saved as commands to be executed from the 
command line, from makefiles, from cron, from other scripts, and so on, those 
capabilities are very useful, just as they are in other programming languages.

There are detailed syntax specifications of various shells available online, 
for example the POSIX shell specification. I don't know whether these would 
work as codeless modules or not, but one way or another, it should be possible 
to support shell as a scripting language by means of a robust syntax module, 
perhaps with variants to support the -isms of specific shells. For example, ksh 
has “if [[ ... ]]” and “function xxx { ...” as well as “if [ ... ]” and “xxx() 
{ ...”; other shells have their own specialized syntactic constructs and 
builtins.

Greg

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to