Skip to content

Commit

Permalink
Code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
agkozak committed Aug 11, 2018
1 parent 6a61577 commit 1de0ea1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions polyglot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -467,8 +467,7 @@ elif [ -n "$KSH_VERSION" ] && ! _polyglot_is_pdksh ; then
PS1=$(print "$PS1")
else
PS1='$(_polyglot_exit_status $?)'
PS1+='${LOGNAME:-$(logname)}'
PS1+='$POLYGLOT_HOSTNAME_STRING '
PS1+='${LOGNAME:-$(logname)}$POLYGLOT_HOSTNAME_STRING '
PS1+='$(_polyglot_ksh_prompt_dirtrim "$POLYGLOT_PROMPT_DIRTRIM")'
PS1+='$(polyglot_branch_status=$(_polyglot_branch_status); echo "${polyglot_branch_status//\!/\!\!}") \$ '
fi
Expand Down Expand Up @@ -556,6 +555,7 @@ elif _polyglot_is_pdksh || [ "$0" = 'dash' ] || _polyglot_is_busybox; then
PS1='\001\r\001\033[31;1m\001$(_polyglot_exit_status $?)\001\033[0m\033[32;1m\001${LOGNAME:-$(logname)}$POLYGLOT_HOSTNAME_STRING\001\033[0m\001 \001\033[34;1m\001$(_polyglot_prompt_dirtrim "$POLYGLOT_PROMPT_DIRTRIM")\001\033[0m\033[33m\001$(_polyglot_branch_status)\001\033[0m\001 \$ '
PS1=$(print "$PS1")
else
# shellcheck disable=SC2025
PS1='\001\r\001\033[31;1m\001$(_polyglot_exit_status $?)\001\033[0m\033[7m\001${LOGNAME:-$(logname)}$POLYGLOT_HOSTNAME_STRING\001\033[0m\001 \001\033[34;1m\001$(_polyglot_prompt_dirtrim "$POLYGLOT_PROMPT_DIRTRIM")\001\033[0m\033[33m\001$(_polyglot_branch_status)\001\033[0m\001 \$ '
PS1=$(print "$PS1")
fi
Expand Down

0 comments on commit 1de0ea1

Please sign in to comment.