You need to first go to settings of
settings -> configure current profile -> Tabs -> Tab title format = %w
The konsole by default ignores what is asked for, it does its own thing, as configured.
%w tells is replaced by what ever the shell wants it to be. There are other codes, use the insert button it knows all the codes.
A brief note on getting the shell to take over from what the terminal emulator was doing.
I have this is my
~/.bashrc it updates the title. You may have to do more research into bash variable
PS1, or look at variable
case "$TERM" in