Skip to content

Commit c10d55d

Browse files
authored
Merge pull request #353 from fox-forks/hyperupcall-code
fix: Quote path variables and avoid `-o`/`-a` flags to `[`
2 parents 25cf067 + db3c893 commit c10d55d

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

config/helpers.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# Other settings and helper functions.
22

33
debug_mode_enabled() {
4-
[ -n "$TMUX_POWERLINE_DEBUG_MODE_ENABLED" -a "$TMUX_POWERLINE_DEBUG_MODE_ENABLED" != "false" ];
4+
[ -n "$TMUX_POWERLINE_DEBUG_MODE_ENABLED" ] && [ "$TMUX_POWERLINE_DEBUG_MODE_ENABLED" != "false" ];
55
}
66

77
patched_font_in_use() {
8-
[ -z "$TMUX_POWERLINE_PATCHED_FONT_IN_USE" -o "$TMUX_POWERLINE_PATCHED_FONT_IN_USE" != "false" ];
8+
[ -z "$TMUX_POWERLINE_PATCHED_FONT_IN_USE" ] || [ "$TMUX_POWERLINE_PATCHED_FONT_IN_USE" != "false" ];
99
}

lib/arg_processing.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
check_arg_side() {
44
local side="$1"
5-
if ! [ "$side" == "left" -o "$side" == "right" -o "$side" == "init" ]; then
5+
if ! [[ "$side" == "left" || "$side" == "right" || "$side" == "init" ]]; then
66
echo "Argument must be the side to handle {left, right} or {init} and not \"${side}\"."
77
exit 1
88
fi

lib/muting.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
# In all cases $1 is the side to be muted (eg left/right).
33

44
powerline_muted() {
5-
[ -e "$(__powerline_mute_file $1)" ];
5+
[ -e "$(__powerline_mute_file "$1")" ];
66
}
77

88
toggle_powerline_mute_status() {
9-
if powerline_muted $1; then
10-
rm "$(__powerline_mute_file $1)"
9+
if powerline_muted "$1"; then
10+
rm "$(__powerline_mute_file "$1")"
1111
else
12-
touch "$(__powerline_mute_file $1)"
12+
touch "$(__powerline_mute_file "$1")"
1313
fi
1414
}
1515

0 commit comments

Comments
 (0)