Multiple shell commands in bash= call fail
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 18.1k
- Forks
- 656
- PR merge metrics
- No merged PRs in 30d
Description
While converting my Bitbar configuration to xbar, I figured out that the bash directive is not working as before. I automated my personal tasks with the bash= directive by concatenating several shell commands with &&. For example: changing shell color, setting correct JAVA version, building and starting SpringBoot application. The following plugin code is stripped down the minimum.
```
XBar Example
---
Tools
--Test Call|bash="(cd $HOME/Library && ls -l)"|terminal=true
```
After selection, the menu item, the shell is going to show this
`zsh: no such file or directory: (cd $HOME/Library && ls -l)
`
Enclosed you'll find a simplified version of such a plugin written in perl.
[xbarSample.1d.pl.txt](https://github.com/matryer/xbar/files/7423439/xbarSample.1d.pl.txt)
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
Start with the attached xbarSample.1d.pl.txt and reproduce the bash= action using the minimal example with a parenthesized command chain. Trace the bash= command handling in xbar, then verify that chained shell commands execute successfully and that terminal=true still behaves as expected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- bash, macos, shell
- Domain
- desktop-dev, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100