mirror of
https://github.com/notwa/rc
synced 2024-11-05 02:19:03 -08:00
12 lines
238 B
Bash
Executable file
12 lines
238 B
Bash
Executable file
#!/usr/bin/env zsh
|
|
|
|
unscreen() {
|
|
local pids="$(screen -ls | fgrep "$1" | cut -d. -f1)"
|
|
for pid in $=pids; do
|
|
local ppid="$(ps h --ppid "$pid" -o pid)"
|
|
kill $=ppid || return 1
|
|
done
|
|
return 0
|
|
}
|
|
|
|
unscreen "$@"
|