1
0
Fork 0
mirror of https://github.com/notwa/rc synced 2024-06-28 10:07:12 -07:00
rc/sh/screeny

20 lines
477 B
Bash
Executable File

#!/usr/bin/env zsh
# YES_ZSH
screeny() { ### @-
### i don't use this anymore~
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" || return 1
echo screen -S "$name" -dm sudo -Hu "$user" "$@"
screen -S "$name" -dm sudo -Hu "$user" "$@"
popd "$home" >/dev/null
return 0
}
[ "${SOURCING:-0}" -gt 0 ] || screeny "$@"