fixed shellcheck SC2015 violation
SC2015 (info): Note that A && B || C is not if-then-else. C may run when A is true
This commit is contained in:
parent
28d6670bb9
commit
adf2e0caec
1 changed files with 11 additions and 5 deletions
16
.tmux.conf
16
.tmux.conf
|
@ -358,7 +358,9 @@ run 'cut -c3- "$TMUX_CONF" | sh -s _apply_configuration'
|
||||||
# done
|
# done
|
||||||
# ;;
|
# ;;
|
||||||
# esac
|
# 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() {
|
# _battery_status() {
|
||||||
|
@ -869,8 +871,10 @@ run 'cut -c3- "$TMUX_CONF" | sh -s _apply_configuration'
|
||||||
#
|
#
|
||||||
# # ignore bindings with errors
|
# # ignore bindings with errors
|
||||||
# if ! tmux source-file "$cfg.in"; then
|
# if ! tmux source-file "$cfg.in"; then
|
||||||
# verbose_flag=$(tmux source-file -v /dev/null 2> /dev/null && printf -- '-v' || true)
|
# if tmux source-file -v /dev/null 2> /dev/null; then
|
||||||
# while ! out=$(tmux source-file "$verbose_flag" "$cfg.in"); do
|
# 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)
|
# line=$(printf "%s" "$out" | tail -1 | cut -d':' -f2)
|
||||||
# perl -n -i -e "if ($. != $line) { print }" "$cfg.in"
|
# perl -n -i -e "if ($. != $line) { print }" "$cfg.in"
|
||||||
# done
|
# done
|
||||||
|
@ -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 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
|
# if ! tmux source-file "$cfg.local"; then
|
||||||
# verbose_flag=$(tmux source-file -v /dev/null 2> /dev/null && printf -- '-v' || true)
|
# if tmux source-file -v /dev/null 2> /dev/null; then
|
||||||
# while ! out=$(tmux source-file "$verbose_flag" "$cfg.local"); do
|
# 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)
|
# line=$(printf "%s" "$out" | tail -1 | cut -d':' -f2)
|
||||||
# perl -n -i -e "if ($. != $line) { print }" "$cfg.local"
|
# perl -n -i -e "if ($. != $line) { print }" "$cfg.local"
|
||||||
# done
|
# done
|
||||||
|
|
Loading…
Reference in a new issue