micro-editor / micro-editor/micro
Weird argument passing when running shell commands
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 29.6k
- Forks
- 1.4k
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 10
Description
I noticed that when the && operator is used in a shell command after Ctrl-b, it seems like everything after the && operator just gets passed as an argument to the previous command rather than those commands being executed separately.
For example, doing Ctrl-b and inputting echo "one" && echo "two" ends up printing one && echo two. This happens when doing things without the string literals as well- for example, running date && date has the first date command fail and print an "extra operand 'date'" error. These same issues happen with run.
I'm using version 2.0.15-dev.245, but it doesn't seem like any commits since this version have affected this issue.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the behavior through Ctrl-b and run using echo "one" && echo "two" and date && date. Trace the shell-command execution path, then verify that the commands after && execute separately rather than being passed as arguments to the first command.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, shell
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100