From 885b76b03aa21a343e0dfcd22584e31e507b5577 Mon Sep 17 00:00:00 2001 From: buffet Date: Mon, 25 Oct 2021 17:30:54 +0000 Subject: [PATCH] Fix prompt --- bash/.bashrc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bash/.bashrc b/bash/.bashrc index 4f1adf1..8c3df15 100644 --- a/bash/.bashrc +++ b/bash/.bashrc @@ -31,8 +31,10 @@ __prompt() { *) PS1='\[\e[31m\]' ;; esac - if [[ "$PWD" = "$HOME" ]]; then + if [[ "$PWD" == "$HOME" ]]; then PS1+='~' + elif [[ "$PWD" == / ]]; then + PS1+=/ else PS1+="${PWD##*/}" fi