scripts
This commit is contained in:
9
arch-user/bin/screen/detach.sh
Executable file
9
arch-user/bin/screen/detach.sh
Executable 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"
|
||||
Reference in New Issue
Block a user