diff options
-rw-r--r-- | .zprofile-dtach | 59 |
1 files changed, 0 insertions, 59 deletions
diff --git a/.zprofile-dtach b/.zprofile-dtach deleted file mode 100644 index ab422d2..0000000 --- a/.zprofile-dtach +++ /dev/null @@ -1,59 +0,0 @@ -if [[ -z "${DTACH_SUB}" ]]; then -{ - setopt NULL_GLOB - - while true; do - set -- $tmpdir/dtach* - if [[ "$#" -gt 0 ]]; then - # session exists, so show the menu - { - while true; do - set -- $tmpdir/dtach* - if [[ "$#" -eq 0 ]]; then - # logout if all sessions terminated - clear - logout - fi - - # list sessions - set -- $tmpdir/dtach* - if [[ "$#" -gt 0 ]]; then - ls $tmpdir/dtach* | sed 's/.*\/dtach-//g' - fi - - echo -n "> " - read -A args - case "${args[1]}" in - "") - break; - ;; - - q) - break; - ;; - - *) - DTACH_SUB=true dtach -A "$tmpdir/dtach-${args[1]}" -z zsh - clear - ;; - esac - - done - } - - clear - logout - else - # create the main session - DTACH_SUB=true dtach -A $tmpdir/dtach-1 -z zsh - clear - set -- $tmpdir/dtach* - if [[ "$#" -eq 0 ]]; then - # logout if all sessions terminated - clear - logout - fi - fi - done -} -fi |