Skip to content

Commit

Permalink
fixup! perf: batch tmux show-options (catppuccin#240)
Browse files Browse the repository at this point in the history
Changes the line separator used by tmux_batch from ':' to the ascii unit
separator

FIXES: catppuccin#240
  • Loading branch information
vdbe committed Aug 6, 2024
1 parent ac00832 commit a9fdf4d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions utils/tmux_utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ get_tmux_batch_option() {
default="$2"

for option_index in "${!tmux_batch_options[@]}"; do
IFS=":" read -r read_option read_value <<<"${tmux_batch_options[$option_index]}"
IFS="" read -r read_option read_value <<<"${tmux_batch_options[$option_index]}"
if [[ "$read_option" == "$option" ]]; then
echo "$read_value"
return
Expand All @@ -78,7 +78,7 @@ get_interpolated_tmux_batch_option() {
default="$2"

for option_index in "${!tmux_batch_options[@]}"; do
IFS=":" read -r read_option read_value <<<"${tmux_batch_options[$option_index]}"
IFS="" read -r read_option read_value <<<"${tmux_batch_options[$option_index]}"
if [[ "$read_option" == "$option" ]]; then
do_color_interpolation "$read_value"
return
Expand All @@ -102,14 +102,14 @@ set_tmux_batch_option() {

# NOTE: don't check for duplicates just append
# for option_index in "${!tmux_batch_options[@]}"; do
# read -d ':' -r read_option <<<"${tmux_batch_options[$option_index]}"
# read -d '' -r read_option <<<"${tmux_batch_options[$option_index]}"
# if [[ "$read_option" == "$option" ]]; then
# tmux_batch_options["$option_index"]="$option:$value"
# tmux_batch_options["$option_index"]="$option$value"
# return
# fi
# done

tmux_batch_options+=("$option:$value")
tmux_batch_options+=("$option$value")
}

run_tmux_batch_commands() {
Expand Down

0 comments on commit a9fdf4d

Please sign in to comment.