Compare commits
6 commits
715a13e871
...
5c5464d4ae
Author | SHA1 | Date | |
---|---|---|---|
5c5464d4ae | |||
249aa0b19c | |||
de0dd93a71 | |||
4b55ac1155 | |||
69e71ee1a3 | |||
c21cbb1e98 |
3 changed files with 31 additions and 29 deletions
|
@ -94,11 +94,11 @@ rwx_source() {
|
||||||
[ -d "${root}" ] ||
|
[ -d "${root}" ] ||
|
||||||
return 1
|
return 1
|
||||||
local file="${2}"
|
local file="${2}"
|
||||||
local count module
|
local count module modules
|
||||||
count=0
|
count=0
|
||||||
__rwx_log "" \
|
__rwx_log "" \
|
||||||
". ${root}"
|
". ${root}"
|
||||||
local modules="$(rwx_find_shell "${root}" "${file}")"
|
modules="$(rwx_find_shell "${root}" "${file}")"
|
||||||
while IFS= read -r module; do
|
while IFS= read -r module; do
|
||||||
count=$((count + 1))
|
count=$((count + 1))
|
||||||
__rwx_log "$(printf "%02d" "${count}") ${module%.sh}"
|
__rwx_log "$(printf "%02d" "${count}") ${module%.sh}"
|
||||||
|
|
|
@ -222,10 +222,10 @@ rwx_self_write() {
|
||||||
local target="${1}"
|
local target="${1}"
|
||||||
if [ -n "${target}" ]; then
|
if [ -n "${target}" ]; then
|
||||||
shift
|
shift
|
||||||
local file text
|
local file files text
|
||||||
text="#! /usr/bin/env sh
|
text="#! /usr/bin/env sh
|
||||||
"
|
"
|
||||||
local files="$(rwx_self_subset "${@}")"
|
files="$(rwx_self_subset "${@}")"
|
||||||
while IFS= read -r file; do
|
while IFS= read -r file; do
|
||||||
text="${text}
|
text="${text}
|
||||||
$(cat "${RWX_ROOT_SYSTEM}/${file}")
|
$(cat "${RWX_ROOT_SYSTEM}/${file}")
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
#= tma
|
#= tma
|
||||||
rwx_tmux_attach() {
|
rwx_tmux_attach() {
|
||||||
local server="${1}"
|
local server="${1}"
|
||||||
if [ "${server}" ]; then
|
if [ -n "${server}" ]; then
|
||||||
tmux -L "${server}" attach-session
|
tmux -L "${server}" attach-session
|
||||||
else
|
else
|
||||||
rwx_tmux_list
|
rwx_tmux_list
|
||||||
|
@ -17,7 +17,7 @@ rwx_tmux_attach() {
|
||||||
#= tmk
|
#= tmk
|
||||||
rwx_tmux_kill() {
|
rwx_tmux_kill() {
|
||||||
local server="${1}"
|
local server="${1}"
|
||||||
if [ "${server}" ]; then
|
if [ -n "${server}" ]; then
|
||||||
tmux -L "${server}" kill-server 2>"/dev/null"
|
tmux -L "${server}" kill-server 2>"/dev/null"
|
||||||
else
|
else
|
||||||
rwx_tmux_list
|
rwx_tmux_list
|
||||||
|
@ -27,7 +27,9 @@ rwx_tmux_kill() {
|
||||||
# list
|
# list
|
||||||
#= tml
|
#= tml
|
||||||
rwx_tmux_list() {
|
rwx_tmux_list() {
|
||||||
ls "/tmp/tmux-$(id --user)"
|
local user_id
|
||||||
|
user_id="$(id --user)"
|
||||||
|
ls "/tmp/tmux-${user_id}"
|
||||||
}
|
}
|
||||||
|
|
||||||
# ╭──────┬───────╮
|
# ╭──────┬───────╮
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue