[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: browser for bash scripts?
From: |
Thorsten Bonow |
Subject: |
Re: browser for bash scripts? |
Date: |
Sat, 01 Dec 2012 00:02:41 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux) |
>>>>> "Stefan" == Stefan Monnier <monnier@iro.umontreal.ca> writes:
TR> Does anyone have code to make speedbar, ECB, or other code browser
TR> display/navigate bash scripts?
Stefan> `sh-script.el' already provides support for `imenu', so Speedbar
Stefan> should already find the functions in the bash scripts, or at least
Stefan> there should be very little preventing it from happening.
TR> I'd like, e.g., to easily navigate between variable and function
TR> definitions and calls/uses.
Stefan> I guess we could add variables to sh-mode's `imenu' support.
Stefan> Stefan
Hi,
I use the skeleton added below for my scripts. Via imenu I can jump to the
beginning of all the "##### XXX #####" blocks and to every function.
Toto
#!/bin/bash
##### Preamble #####
...
##### Functions #####
function dummy_function() {
...
return
} # end of dummy_function
...
##### Initialization And Setup #####
...
##### Command Line Processing #####
...
##### Main Logic #####
...
# Local Variables:
# mode: outline-minor
# outline-regexp: "\\(function\\)\\|\\(##### \\)"
# outline-heading-end-regexp: "\\(() {\n\\)\\|\\( #####\n\\)"
# fill-column: 70
# End:
--
This twinkie thing---it ain't over yet.
Tallahassee (Woody Harrelson): Zombieland