Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

defining a function in a shell script doesn't work.

#18

If a shell script include a function definition (see attached example), then running it through shint hangs.

the example is real world and might be a little bit long, but my guess is that any multiline shell function will do:

my-function () {
echo foo }

Reported by David Jones · March 5th, 2012 @ 11:23 AM

State: open
Milestone: none
Assigned to: nobody

Activity

  1. David Jones
    David Jones

    oh, silly thing has mangled the line wrapping, but you know.

    March 5th, 2012 @ 11:25 AM

  2. David Jones
    David Jones

    It's the secondary prompt thing. Adding a match for it in PROMPT_REGEX and setting PS2 (to guard against crazy people like me who might actually set PS2 to something different) fixes the problem. Occurs to me that this probably fixes all sort of problems with shell scripts that have statements that continue onto more than one line (for example, a quoted string spread over 2 lines, or a pipeline where the rest of the pipe is on the next line, multiline for loops, etc, etc).

    https://github.com/drj11/dexy/commit/a29751463b36c36b368a51b7433440...

    March 8th, 2012 @ 01:06 PM

  3. Ana Nelson
    Ana Nelson
    • State changed from new to open

    March 10th, 2012 @ 01:29 PM

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.