diff options
author | katherine <ageha@airen-no-jikken.icu> | 2020-09-09 10:00:36 -0700 |
---|---|---|
committer | katherine <ageha@airen-no-jikken.icu> | 2020-09-09 10:00:36 -0700 |
commit | d74f49bb93b14d0cfe18f76ba6e02716bc883c5a (patch) | |
tree | cfb1fe6c0a33916c474baeb3a1ec3fdc43220a72 | |
parent | b41055f11a69cf51240d3935522b47044330adf6 (diff) | |
download | dotfiles-d74f49bb93b14d0cfe18f76ba6e02716bc883c5a.tar.gz |
dump dtach
-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 |