matryer / matryer/xbar-plugins
nested structures do not work with multiline output commands.
- 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
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