From 578d3d5508ebed9952cb449ab5a4ab92f8a02ccf Mon Sep 17 00:00:00 2001 From: 10sr <8.slashes@gmail.com> Date: Thu, 26 Mar 2020 13:18:16 +0900 Subject: [PATCH] Remove dsession function --- shrc | 52 ---------------------------------------------------- 1 file changed, 52 deletions(-) diff --git a/shrc b/shrc index a24d1ea..d2584f2 100755 --- a/shrc +++ b/shrc @@ -672,58 +672,6 @@ tx(){ fi } -__dsession(){ - # dt [-h] [] [] - __dtach_dir="${TMP}/dtach" - mkdir -p "${__dtach_dir}" - - if test -n "${__MY_DTACH}" - then - # if already in dtach session print current session - soc_name="`basename "$__MY_DTACH"`" - echo "Current session: ${soc_name}" - fi - - if test -z "$1" - then - # if no arg given show list of sessions - echo "Usage: ds []" - echo "Sessions:" - ls "${__dtach_dir}" - return 0 - elif test "$1" = "-h" - then - echo "dt: usage: dt [-h] [] []" 1>&2 - return 1 - fi - - # set socket name - soc_name="${__dtach_dir}/$1" - shift - - if test -n "$__MY_DTACH" - then - echo "dtach session cannot be nested." 1>&2 - return 1 - elif test -S "$soc_name" - then - dtach -a "$soc_name" -e ^^ - elif test -e "$soc_name" - then - echo "dt: File named $soc_name already exists." - return 1 - elif test -z "$1" - then - # if no command given invoke current shell - __MY_DTACH="$soc_name" dtach -c "$soc_name" -e ^^ sh -c "$SHELL" - # echo "dt: Socket named $soc_name not exists and no command specified." - # return 1 - else - __MY_DTACH="$soc_name" dtach -c "$soc_name" -e ^^ "$@" - fi -} -null type dtach && alias ds=__dsession - scr(){ test -n "$1" && pf="${1}-" ___tformat="%Y%m%d-%H%M%S%z"