First of all many thanks to everybody who responded/commented.
bls asked me to check my .bashrc and correct my mistakes. I did that and I apologize for the errors in my .bashrc. I corrected those errors and as I expected the code now works but only if the current working directory is $HOME. In other words if the directory simply contains "/home/USER" it does not do the "~" substitution. That's why I had made the comment about the only place i have seen the "~" substitution is for PS1 which accepts the "\w" escape sequence. But thank you very much bls.
As far as what Murph9000 said, let me say again:
I guess enough said about the problem.
Thanks everyone
bls asked me to check my .bashrc and correct my mistakes. I did that and I apologize for the errors in my .bashrc. I corrected those errors and as I expected the code now works but only if the current working directory is $HOME. In other words if the directory simply contains "/home/USER" it does not do the "~" substitution. That's why I had made the comment about the only place i have seen the "~" substitution is for PS1 which accepts the "\w" escape sequence. But thank you very much bls.
As far as what Murph9000 said, let me say again:
I guess the whole point is moot after I implemented the corrections suggested by bls. However, I have to admit that Murph9000's solution is easier and I guess more elegant(but has exactly the same problems, i.e. only works if the current working directory is HOME).I want the Current Working Directory to appear on the title of the terminal not the prompt.
I guess enough said about the problem.
Thanks everyone
Statistics: Posted by cimpi — Fri Sep 27, 2024 9:36 pm