From 3aa6ec606558996979231ecb29dbd141d6b1f848 Mon Sep 17 00:00:00 2001 From: Luxferre Date: Sat, 25 Apr 2026 07:30:41 +0300 Subject: [PATCH] updated abmux to send screen-clear command with expect --- abmux.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/abmux.sh b/abmux.sh index 7ccecae..7f8585f 100755 --- a/abmux.sh +++ b/abmux.sh @@ -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