2
rated 0 times
[
2]
[
0]
/ answers: 1 / hits: 10628
/ 2 Years ago, mon, november 15, 2021, 7:39:18
Need help to change the command prompt. I want short name. Look below :
kirti@kirti-Aspire-5733Z:~$ cd workspace
kirti@kirti-Aspire-5733Z:~/workspace$ cd Ruby
kirti@kirti-Aspire-5733Z:~/workspace/Ruby$
I am looking for my initial command prompt, when I will open it using 'Ctrl+Alt+t' as
$(arup):
$(arup): cd workspace
$(workspace): cd Ruby
$(Ruby) :
In my ~/.bashrc
file did put as below :
if [ "$color_prompt" = yes ]; then
PROMPT_DIRTRIM=1
PS1='w $ '
else
PS1='w $ '
By replacing
if [ "$color_prompt" = yes ]; then
PS1='${debian_chroot:+($debian_chroot)}[033[01;32m]u@h[033[00m]:[033[01;34m]w[033[00m]$ '
else
# PS1='${debian_chroot:+($debian_chroot)}u@h:w$ '
PS1='arup :w$ '
fi
unset color_prompt force_color_prompt
# If this is an xterm set the title to user@host:dir
case "$TERM" in
xterm*|rxvt*)
PS1="[e]0;${debian_chroot:+($debian_chroot)}u@h: wa]$PS1"
;;
*)
;;
esac
But I didn't find any change in my shell:
May I have some help to configure the above settings ?
More From » bash