diff options
Diffstat (limited to 'ksh/kshrc.d/prompt.ksh')
-rw-r--r-- | ksh/kshrc.d/prompt.ksh | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/ksh/kshrc.d/prompt.ksh b/ksh/kshrc.d/prompt.ksh index f0aaadd3..8fbce020 100644 --- a/ksh/kshrc.d/prompt.ksh +++ b/ksh/kshrc.d/prompt.ksh @@ -35,6 +35,14 @@ prompt() { # Add terminating "$" or "#" sign PS1=$PS1'\$' + # Add > signs at the front of the prompt to show the current shell + # 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 + PS1='>'$PS1 + done + # Declare variables to contain terminal control strings typeset format reset |