1
0
Fork 0
mirror of https://github.com/notwa/rc synced 2024-07-01 03:07:13 -07:00
rc/sh/screeny

16 lines
318 B
Plaintext
Raw Normal View History

2015-12-06 12:35:57 -08:00
#!/usr/bin/env zsh
screeny() {
local user="${1:?needs arg for user name}"
shift
home="/home/$user"
pushd "$home" >/dev/null
local name="${1:?needs arg for screen name}"
shift
~/sh/unscreen "$name"
screen -S "$name" -dm sudo -Hu "$user" "$@"
popd "$home" >/dev/null
}
screeny "$@"