aboutsummaryrefslogtreecommitdiff
path: root/ksh/kshrc.d
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2016-12-17 19:07:56 +1300
committerTom Ryder <tom@sanctum.geek.nz>2016-12-17 19:08:45 +1300
commite4da3c156898719319dad92a52fe0aea02885a5b (patch)
treed00379538b26a0ecfe492c828891942d4cb9ec0c /ksh/kshrc.d
parentMove HOSTNAME call into shrc (diff)
downloaddotfiles-e4da3c156898719319dad92a52fe0aea02885a5b.tar.gz
dotfiles-e4da3c156898719319dad92a52fe0aea02885a5b.zip
Remove for loop from ksh prompt def
mksh can't into it
Diffstat (limited to 'ksh/kshrc.d')
-rw-r--r--ksh/kshrc.d/prompt.ksh4
1 files changed, 3 insertions, 1 deletions
diff --git a/ksh/kshrc.d/prompt.ksh b/ksh/kshrc.d/prompt.ksh
index 397a1b91..a5b872ce 100644
--- a/ksh/kshrc.d/prompt.ksh
+++ b/ksh/kshrc.d/prompt.ksh
@@ -39,8 +39,10 @@ prompt() {
# level, taking tmux sessions into account, assuming this version
# of ksh does SHLVL (I think only ksh93 does it
typeset shlvl
- for ((shlvl = SHLVL - TMUX_SHLVL; shlvl > 1; shlvl--)) ; do
+ ((shlvl = SHLVL - TMUX_SHLVL))
+ while ((shlvl > 1)); do
PS1='>'$PS1
+ ((shlvl--))
done
# Declare variables to contain terminal control strings