This commit is contained in:
2025-06-05 13:01:49 +00:00
parent dd52f1afe6
commit 719baaf847
14 changed files with 47 additions and 52 deletions

9
arch-user/bin/screen/detach.sh Executable file
View File

@@ -0,0 +1,9 @@
#!/bin/bash
session_name="$1"
shift
tmpfile=$(mktemp)
cmd="$(printf "%q " "$@")"
qcmd="$(printf "%q " "$cmd")"
echo -e ". ~/.bashrc\nhistory -s "$qcmd"\necho "$qcmd"\n$cmd && exit" > "$tmpfile"
screen -S "$session_name" -dm bash --init-file "$tmpfile"