commit 3cecafce41d037d28d27dd5bf20bb762e7f0f89c (patch) parent a7638bee111ea87849cd7f69969fe513f2a3b0fd Author: Alex Karle <alex@alexkarle.com> Date: Tue, 23 Feb 2021 15:56:56 -0500 bash: Move user@host before git-branch/status in PS1 Diffstat:
M | .bashrc | | | 6 | +++--- |
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/.bashrc b/.bashrc @@ -46,7 +46,7 @@ if [ -n "$PRETTY_COLORS" ]; then } git_info() { - echo "$(git branch --show-current 2>/dev/null)$(parse_git_dirty)" + echo " $(git branch --show-current 2>/dev/null)$(parse_git_dirty)" } # Preferred Prompt: fancy with colors from tput @@ -60,11 +60,11 @@ if [ -n "$PRETTY_COLORS" ]; then BOLD="\[$(tput bold)\]" RESET="\[$(tput sgr0)\]" - PS1_TOP="$BOLD$RED\$(last_err)$BLUE\w $RESET$GRAY\$(git_info) [\u@\h]" + PS1_TOP="$BOLD$RED\$(last_err)$BLUE\w $RESET$GRAY[\u@\h]\$(git_info)" PS1="$PS1_TOP\n$BOLD$MAGENTA\$ $RESET" PS2="$YELLOW> $RESET" else - PS1="\$(last_err)\w \$(git_info) [\u@\h]\n\$ " + PS1="\$(last_err)\w [\u@\h]\$(git_info)\n\$ " fi fi