updated abmux to send screen-clear command with expect

This commit is contained in:
Luxferre
2026-04-25 07:30:41 +03:00
parent 4eb08132b4
commit 3aa6ec6065
+4 -2
View File
@@ -1,5 +1,5 @@
#!/bin/sh
# abmux: a simple terminal session switcher on top of abduco and fzf
# abmux: a simple terminal session switcher on top of abduco, fzf and expect
# Created by Luxferre in 2026, released into the public domain
FTR='Select a session or create a new one'
@@ -9,5 +9,7 @@ while true; do
[ "$sname" = 'Quit' ] && break
[ "$sname" = 'New' ] && read -r -p 'New session name: ' sname
sname="$(echo "$sname" | sed -E 's/^[0-9]+\ -\ //')"
[ -n "$sname" ] && abduco -A "$sname" "$SHELL"
if [ -n "$sname" ]; then
expect -c "spawn abduco -A \"$sname\" $SHELL; send \"\014\"; interact"
fi
done