Issue with Multi-line Command Parsing
- Dominant language
- Shell
- Stars
- 19
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
When parsing commands that extend over multiple lines, they're not always parsed as expected.
**To reproduce:**
Consider the following multi-line command:
```bash
sed 's/.*\(.\)\(.\)\2\1.*/p: \1\2-\2\1/;t
g' "$file_1" > "$file_2"
```
Upon transformation, it becomes:
```bash
sed 's/.*\(.\)\(.\)\2\1.*/p: \1\2-\2\1/;t g' "$file_original" > "$file_palindrome"
```
This flattened version of the command throws an error when executed.
**Suggested Solutions:**
1) Retain the multi-line format in the Rikerfile during parsing, preserving the original structure. This will likely solve comment related issues (#60) too.
2) Alternatively, during transformation, replace new lines in commands with `;`. In most scenarios, this should yield the same result (correct me if I am wrong). For example, the following should execute without errors:
```bash
sed 's/.*\(.\)\(.\)\2\1.*/p: \1\2-\2\1/;t;g' "$file_1" > "$file_2"
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.