From 1a6fc4f78de8dd17e090ff4fd3afb230cfb8b3b3 Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Fri, 14 Aug 2015 01:48:31 +0900 Subject: [PATCH] Some fixes for DSession and print info on login --- shrc | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/shrc b/shrc index 98d7a41..14e8d35 100755 --- a/shrc +++ b/shrc @@ -223,6 +223,14 @@ __safe_run w yuk # echo # fi +if test -n "$__MY_DTACH" +then + echo + echo DSession: Current Session: "`basename "$__MY_DTACH"`" + echo DSession: Press C-^ to Exit. + true +fi + i(){ w ss -lnp @@ -640,7 +648,7 @@ tx(){ tmux start-server if test -z "$1" then - echo "usage: tx " + echo "usage: tx []" tmux list-sessions elif test -z "$TMUX" then @@ -655,7 +663,7 @@ tx(){ fi } -dt(){ +__dsession(){ # dt [-h] [] [] __dtach_dir="${TMP}/dtach" mkdir -p "${__dtach_dir}" @@ -670,6 +678,7 @@ dt(){ if test -z "$1" then # if no arg given show list of sessions + echo "Usage: ds []" echo "Sessions:" ls "${__dtach_dir}" return 0 @@ -704,6 +713,7 @@ dt(){ __MY_DTACH="$soc_name" dtach -c "$soc_name" -e ^^ "$@" fi } +null type dtach && alias ds=__dsession scr(){ test -n "$1" && pf="${1}-"