Skip to content

Commit

Permalink
fixed shellcheck SC2015 violation
Browse files Browse the repository at this point in the history
SC2015 (info): Note that A && B || C is not if-then-else. C may run when A is true
  • Loading branch information
gpakosz committed Mar 5, 2023
1 parent 28d6670 commit adf2e0c
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions .tmux.conf
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,9 @@ run 'cut -c3- "$TMUX_CONF" | sh -s _apply_configuration'
# done
# ;;
# esac
# [ "$count" -ne 0 ] && charge=$(awk -v charge="$charge" -v count="$count" 'BEGIN { print charge / count }') || true
# if [ "$count" -ne 0 ]; then
# charge=$(awk -v charge="$charge" -v count="$count" 'BEGIN { print charge / count }')
# fi
# }
#
# _battery_status() {
Expand Down Expand Up @@ -869,8 +871,10 @@ run 'cut -c3- "$TMUX_CONF" | sh -s _apply_configuration'
#
# # ignore bindings with errors
# if ! tmux source-file "$cfg.in"; then
# verbose_flag=$(tmux source-file -v /dev/null 2> /dev/null && printf -- '-v' || true)
# while ! out=$(tmux source-file "$verbose_flag" "$cfg.in"); do
# if tmux source-file -v /dev/null 2> /dev/null; then
# verbose_flag='-v'
# fi
# while ! out=$(tmux source-file "${verbose_flag:+$verbose_flag}" "$cfg.in"); do
# line=$(printf "%s" "$out" | tail -1 | cut -d':' -f2)
# perl -n -i -e "if ($. != $line) { print }" "$cfg.in"
# done
Expand Down Expand Up @@ -1504,8 +1508,10 @@ run 'cut -c3- "$TMUX_CONF" | sh -s _apply_configuration'
#
# if perl -n -e 'print if /^\s*(?:set|bind|unbind).+?#!important\s*$/' "$TMUX_CONF_LOCAL" 2>/dev/null > "$cfg.local"; then
# if ! tmux source-file "$cfg.local"; then
# verbose_flag=$(tmux source-file -v /dev/null 2> /dev/null && printf -- '-v' || true)
# while ! out=$(tmux source-file "$verbose_flag" "$cfg.local"); do
# if tmux source-file -v /dev/null 2> /dev/null; then
# verbose_flag='-v'
# fi
# while ! out=$(tmux source-file "${verbose_flag:+$verbose_flag}" "$cfg.local"); do
# line=$(printf "%s" "$out" | tail -1 | cut -d':' -f2)
# perl -n -i -e "if ($. != $line) { print }" "$cfg.local"
# done
Expand Down

0 comments on commit adf2e0c

Please sign in to comment.