mise API - v0.0.0
    Preparing search index...

    Function semicolons_parse

    • Parses a command line into the commands of its list, without their conditions: for a caller that looks at every command a line holds. Respects quoted strings: a joiner inside quotes is not a separator.

      Parameters

      • line: string

        The full command line.

      Returns string[]

      An array of individual commands.

      semicolons_parse("ls; pwd")                    // Returns: ["ls", "pwd"]
      semicolons_parse("echo 'a;b'; pwd") // Returns: ["echo 'a;b'", "pwd"]
      semicolons_parse("cd /tmp && ls; cat file.txt") // Returns: ["cd /tmp", "ls", "cat file.txt"]