Path name no longer gets updated in tabs of xfce4-terminal once you update $prompt

120 Views Asked by At

I'm using xfce4-terminal in XFCE and each tab by default shows the user/host/path name of that tab, which is what I want.

However, once I change $prompt (to customize it), this no longer happens. New tabs now actually come up with the name "Untitled".

Before I made the change, this was the content of $prompt:

echo $prompt %%[%n@%m %c]%#

But even if I do this, I never get the tab name to get updated again: set prompt = '%%[%n@%m %c]%#'

In fact, I know something is wrong here because when I set $path to that value, I actually pick up another "%" sign in the front of the prompt that wasn't there before.

Could someone please help me explain this and tell me how to fix it?

1

There are 1 best solutions below

0
Taqras On

I'm not sure if I understand the codes you are using, but, assuming you're using Bash, I think maybe you're trying to do something like this:

PS1="\[\e]2;\u@\h: \w\a\]\u@\h: \w \$ "

If you are using Bash, here's info on Bash in general, and the prompt in particular.

Also, the Arch Wiki contains a bit more prompt snacks :-)