[Top][All Lists]

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

RE: Shell scripting mode

From: Doug Lewan
Subject: RE: Shell scripting mode
Date: Thu, 10 Oct 2013 14:01:28 +0000

Thanks for the list.

Some of your suggestions are almost there already. (And maybe that's why 
they're not all there. The community may have settled for "good enough".)

Here are my thoughts:

- Code completion ...
    M-/ comes close. I agree that something shell-specific would be a good 
    Handling previously defined functions from other files might be tricky.
    After all, which previously defined function from which other file sounds a 
little vague to me.
- Navigation ...
    Exuberant ctags should do exactly what you want.
    (I don't think the etags that comes with emacs handles shell, but I could 
be wrong.)
- Flymake for shell
    Not there. This would be *very* useful.
    Shells are so full of syntax that it's often very hard to find a mistake.
- Interaction with lower process
    This would be very useful too. And probably not hard to write. 
    All the screwy syntax might mess such a thing up. 
    (Think unterminated string or an unterminated ${variable.)
    A command like M-x sh-eval-region that always starts (and terminates) a 
clean shell might work though.
- Online Documentation of shell builtins
    Info for bash is pretty good.
    Something that navigates it directly would indeed be nice.
    As far as other shells go, it's probably a hard thing to do.
    You'd have to get all the authors/publishers to definitively declare their 
help locations, formats, etc.
    Better yet, they could all agree on one location, one format, etc. (Ha! I 
made a joke!)
- Yassnippet library
    Personally I'm happy typing almost everything in shell.
    (The exception is option handling. 
    I never remember if getopt or getopts is the built-in, and that's the one I 
    I don't happen to know yassnippet since I use very few emacs applications 
that aren't delivered with emacs.

Douglas Lewan
Shubert Ticketing
(201) 489-8600 ext 224

These are my principles and if you don't like them... well, I have others. - 
Groucho Marx

-----Original Message-----
From: address@hidden [mailto:address@hidden On Behalf Of Adrián Martínez Larumbe
Sent: Thursday, 2013 October 10 09:27
To: address@hidden
Subject: Re: Shell scripting mode

This is a short wishlist I've compiled that pretty much sums up
everything I was looking for when I wrote the post:

- Code completion of shell bultins and previously defined functions
        (I guess this could be done by writing a wordlist for autocomplete mode)
- Navigation: imenu, buffer definitions, etags, gtags?
        (I'm wondering whether etags has shell scripting support, I'll
        look this up myself)
- Flymake for shell
        (There seems to be a mode for this on elpa repositories)
- Interaction with lower process
        (It'd be awesome if I could send arbitrary regions into the
        shell for immediate execution)
- Online Documentation of shell builtins
        (I guess the best way is turning to woman and reading the
        matching section)
- Yassnippet library
        (The sh scripting mode that ships with emacs has predefined
        functions for skeletons of common constructs, but I think this
        is unnecessary if you put it all into a yasnipet mode directory)

reply via email to

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