2KAbhishek / tmux-tea

tmux sessions as easy as tea ☕🪟
GNU General Public License v3.0
21 stars 1 forks source link

[BUG]: fails in attached mode if `$FZF_TMUX_OPTS` is empty #3

Closed f4z3r closed 3 weeks ago

f4z3r commented 1 month ago

Description of the bug

The plugin fails when the env variable $FZF_TMUX_OPTS is not set or empty.

Steps To Reproduce

  1. Unset $FZF_TMUX_OPTS
  2. Launch the plugin via the Ctrl+T shortcut.

Additional Information

An easy fix is to set the variable to something. But is linked to not checking that the variable is set before using it here: https://github.com/2KAbhishek/tmux-tea/blob/8a150154a68a1a1d0c575098a1aa649da4090371/bin/tea.sh#L89

This results in fzf-tmux being called with an empty string as it's last argument which makes it fail.