updated abmux to send screen-clear command with expect
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
#!/bin/sh
|
#!/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
|
# Created by Luxferre in 2026, released into the public domain
|
||||||
|
|
||||||
FTR='Select a session or create a new one'
|
FTR='Select a session or create a new one'
|
||||||
@@ -9,5 +9,7 @@ while true; do
|
|||||||
[ "$sname" = 'Quit' ] && break
|
[ "$sname" = 'Quit' ] && break
|
||||||
[ "$sname" = 'New' ] && read -r -p 'New session name: ' sname
|
[ "$sname" = 'New' ] && read -r -p 'New session name: ' sname
|
||||||
sname="$(echo "$sname" | sed -E 's/^[0-9]+\ -\ //')"
|
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
|
done
|
||||||
|
|||||||
Reference in New Issue
Block a user