byobu-reconnect-sockets fails silently in zsh
Bug #923169 reported by
Ryan Thompson
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
byobu |
Fix Released
|
Medium
|
Unassigned |
Bug Description
Zsh by default does not split variables into multiple values, so when you do:
for var in $VARS_TO_UPDATE; do ... done
in Zsh this is equivalent to
for var in "$VARS_TO_UPDATE"; do ... done
One fix is to set some sh-compatibility options, but this is a bad idea because the zsh used is sourcing this script, so the compatibility options will persist in that shell I'm attaching a patch that wraps "$VARS_TO_UPDATE" inside $(echo ...), which forces word splitting and makes the script work when sourced from zsh. I've also tested the fix in bash, and it still works. Obviously if you target compatibility with any shells other than bash and zsh, you should test the fix in them too.
Related branches
Changed in byobu: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Thanks, Ryan.