zsh: include/common needs sh_word_split option: "command not found: command -v"
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
byobu |
Fix Released
|
Medium
|
Unassigned |
Bug Description
When sourcing byobu-reconnect
byobu/
The following change causes the error:
revno: 2067
committer: Dustin Kirkland <email address hidden>
branch nick: byobu
timestamp: Thu 2013-02-07 14:46:56 -0600
message:
* debian/rules, usr/bin/byobu, usr/bin/
usr/
- clean up some bashisms (better portability)
- checkbashisms at build time
diff:
=== modified file 'usr/lib/
--- usr/lib/
+++ usr/lib/
@@ -23,13 +23,9 @@
. "${BYOBU_
# Find command/type/which
- if command -v 2>/dev/null; then
- BYOBU_TEST="command -v"
- elif type 2>/dev/null; then
- BYOBU_TEST="type"
- else
- BYOBU_TEST="which"
- fi
+ for BYOBU_TEST in "command -v" "type" "which"; do
+ $BYOBU_TEST >/dev/null && break
+ done
# If the backend is already set (eg. running `byobu-tmux`), do nothing.
if [ -z "${BYOBU_BACKEND}" ]; then
Previously the error only happened when $BYOBU_TEST was actually used.
What do you think about using a function instead of a variable (and pass the command to be run as argument(s))?
This could then wrap the "setopt" needed for zsh, which is already used with tmux_update and screen_update:
[ "x$ZSH_VERSION" != x ] && setopt local_options sh_word_split
This is with byobu r2123.
Changed in byobu: | |
importance: | Undecided → Medium |
status: | New → In Progress |
Changed in byobu: | |
status: | Fix Committed → Fix Released |
Changed in byobu: | |
status: | Fix Committed → Fix Released |
Confirmed in byobu 5.35 + ZSH 5.0.2.