aboutsummaryrefslogtreecommitdiffstats
path: root/toggle-term.sh
diff options
context:
space:
mode:
authorEugene Triguba <hello@eugenetriguba.com>2025-08-16 16:02:35 -0400
committerEugene Triguba <hello@eugenetriguba.com>2025-08-16 16:02:35 -0400
commit2a0a194237f55d663b47f992c4b1f12c246804c6 (patch)
treeab601bfb8312da6e3d4ed7f271a73af44733d143 /toggle-term.sh
parentUpdate docs and setting (diff)
downloadtmux-toggle-term-2a0a194237f55d663b47f992c4b1f12c246804c6.zip
Remove need for bc
Diffstat (limited to 'toggle-term.sh')
-rwxr-xr-xtoggle-term.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/toggle-term.sh b/toggle-term.sh
index ab5f87f..ace5978 100755
--- a/toggle-term.sh
+++ b/toggle-term.sh
@@ -49,7 +49,7 @@ toggle_split() {
# *
# *
panes_list="$($TMUX_CMD list-panes -F '#{window_flags}')"
- pane_count="$(echo "${panes_list}" | wc -l | bc)"
+ pane_count="$(echo "${panes_list}" | wc -l | sed 's/^[[:space:]]*//g')"
if [ "${pane_count}" = 1 ]; then
# And when we only have 1 pane, we want to split it into two
# and open a new one at the current path of the first pane.