Skip to content

Simplify print_status in rofi-bluetooth#30

Open
saolof wants to merge 2 commits intonickclyde:masterfrom
saolof:patch-1
Open

Simplify print_status in rofi-bluetooth#30
saolof wants to merge 2 commits intonickclyde:masterfrom
saolof:patch-1

Conversation

@saolof
Copy link
Copy Markdown

@saolof saolof commented Oct 8, 2023

This replaces the mapfile + bash array code with a simple pipe into a while loop and simplifies the logic a bit.

It also makes the script more portable. The only remaining bashism is the pair of echo -e "$options" calls, which can be replaced with a slightly uglier printf "$options" if posix compatibility is desired. The script runs fine on dash.

saolof added 2 commits October 8, 2023 15:20
This replaces the mapfile + bash array code with a simple pipe into a while loop and simplifies the logic a bit.

It also makes the script more portable. The only remaining bashism is the pair of  echo -e "$options"  calls, which can be replaced with a slightly uglier printf "$options" if posix compatibility is desired. Then the script runs fine on dash.
@mcepl mcepl mentioned this pull request Apr 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant