X-Git-Url: https://git.distorted.org.uk/~mdw/profile/blobdiff_plain/55bd026152a0d09c69a2e6113d46928a3ad22ed9..55360ba3c63340f93f16784506613ea8df032003:/dot/shell-rc diff --git a/dot/shell-rc b/dot/shell-rc index 4538bc3..55934d5 100644 --- a/dot/shell-rc +++ b/dot/shell-rc @@ -25,8 +25,8 @@ __mdw_set_prompt_pieces () { ## Fancy highlighting in some terminals. local bold unbold nl gitcolour rccolour uncolour - local host dir - bold="" unbold="" nl="" gitcolour="" rccolour="" uncolour="" + local host dir more + bold="" unbold="" nl="" gitcolour="" rccolour="" uncolour="" more="" __mdw_set_prompt_hacks ## Choose the right delimiters. Highlight root prompts specially; @@ -71,11 +71,12 @@ __mdw_set_prompt_pieces () { __mdw_prompt_rc_left="$unbold$rccolour" __mdw_prompt_rc_right="$uncolour$bold" __mdw_prompt_right="$right$unbold" + __mdw_prompt_more=" $more$bold>$unbold " } __mdw_set_prompt () { - case "$TERM" in - dumb) + case "${TERM-dumb}:${INSIDE_EMACS+$INSIDE_EMACS}" in + dumb:) case $(id -u) in 0) PS1='# ' ;; *) PS1='$ ' ;; esac PS2='> ' ;; @@ -92,7 +93,7 @@ __mdw_set_prompt () { *) rc="$__mdw_prompt_rc_left rc=$__mdw_last_rc$__mdw_prompt_rc_right" ;; esac PS1="$__mdw_prompt_left$git$rc$__mdw_prompt_right" - PS2="$PS1 $bold>$unbold " + PS2="$PS1$__mdw_prompt_more" unset __mdw_last_rc ;; esac