diff options
author | katherine <ageha@airen-no-jikken.icu> | 2019-12-08 09:43:44 -0700 |
---|---|---|
committer | katherine <ageha@airen-no-jikken.icu> | 2019-12-08 09:43:44 -0700 |
commit | bc06b8ae7e83c2901dff2bc7a2947b3e870be168 (patch) | |
tree | e9fc5116b42e7f8672c90a4baf2312562ad80ced /.zprofile-dtach | |
parent | 965f07eb383810da6c2233d324d427eb147e40f4 (diff) | |
download | dotfiles-bc06b8ae7e83c2901dff2bc7a2947b3e870be168.tar.gz |
use tmpdir in vars
Diffstat (limited to '.zprofile-dtach')
-rw-r--r-- | .zprofile-dtach | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/.zprofile-dtach b/.zprofile-dtach index 4571f94..b2256cb 100644 --- a/.zprofile-dtach +++ b/.zprofile-dtach @@ -3,12 +3,12 @@ if [[ -z "${DTACH_SUB}" ]]; then setopt NULL_GLOB while true; do - set -- /tmp/dtach* + set -- $tmpdir/dtach* if [[ "$#" -gt 0 ]]; then # session exists, so show the menu { while true; do - set -- /tmp/dtach* + set -- $tmpdir/dtach* if [[ "$#" -eq 0 ]]; then # logout if all sessions terminated clear @@ -16,9 +16,9 @@ if [[ -z "${DTACH_SUB}" ]]; then fi # list sessions - set -- /tmp/dtach* + set -- $tmpdir/dtach* if [[ "$#" -gt 0 ]]; then - ls /tmp/dtach* | sed 's/\/tmp\/dtach-//g' + ls $tmpdir/dtach* | sed "s/\$tmpdir\/dtach-//g" fi echo -n "> " @@ -33,7 +33,7 @@ if [[ -z "${DTACH_SUB}" ]]; then ;; *) - DTACH_SUB=true dtach -A "/tmp/dtach-${args[1]}" -z zsh + DTACH_SUB=true dtach -A "$tmpdir/dtach-${args[1]}" -z zsh clear ;; esac @@ -45,9 +45,9 @@ if [[ -z "${DTACH_SUB}" ]]; then logout else # create the main session - DTACH_SUB=true dtach -A /tmp/dtach-1 -z zsh + DTACH_SUB=true dtach -A $tmpdir/dtach-1 -z zsh clear - set -- /tmp/dtach* + set -- $tmpdir/dtach* if [[ "$#" -eq 0 ]]; then # logout if all sessions terminated clear |