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 10, 2024
1 parent 4a021a3 commit 9aea1de
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 @@ -64,7 +64,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 @@ -80,7 +80,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 @@ -104,14 +104,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 9aea1de

Please sign in to comment.