matryer / matryer/xbar-plugins

nested structures do not work with multiline output commands.

Open
#1,222 0 comments 0 reactions 0 assignees View on GitHub
question
Dominant language
Shell
Stars
2.6k
Forks
1.1k
Avg merge
9d 15h
Merged PRs (30d)
1

Description

the following code does not behave as expected. only the first line of the output gets nested while the others appear under the supposed parent directory.
Also it cannot be worked around easily, as the item count would need to be calculated and then echo in a `while [item left] true` loop, which appears to be overkill.

```
folder_content=$(ls ~/my\ folder/)

echo "My Folder"
echo "----"
echo "--" "$folder_content"
```

However it appears like

|-My Folder
… |- [nested] Folder_content_item_1
|-Folder_content_item_2
|-Folder_content_item_3
|-Folder_content_item_4

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the supplied shell snippet and inspect how multiline command output is interpreted for nested menu structures. Done means every line from folder_content appears under My Folder, rather than only the first line being nested.

Written by the indexing model from the issue text.

Assessment

Tech stack
shell
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.