Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

codeToHTML - Bash (shellscript) hangs on some statements #53

Open
@chaseleif

Description

@chaseleif

Hallo, problem is with tag v1.1.4 and I have found:

In shellscript.json, we have a group, "normal_statement_seperator" which includes 4 symbols:
The semicolon,; "name": "punctuation.separator.semicolon.range"
An and,&& "name": "punctuation.separator.statement.and.shell"
An or,|| "name": "punctuation.separator.statement.or.shell"
A background,& "name": "punctuation.separator.statement.background.shell"

I first came on the problem that a script would hang if it backgrounded a process, a simple example:

sleep 10&

The statement background separator is used on lines 64 and 1817, I noticed there could be an issue with the grouping and confirmed there is a problem with this grouping.
The same problem occurs if you use a semicolon with a command on a single line, this also hangs:

echo hallo;

Then, if you put a statement on the same line (after either semicolon or ampersand), it will parse successfully:

sleep 10&echo hallo

A workaround, resulting in valid output, could be to use the nop:

sleep 10&:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp