I’m accessing a Linux machine from a Windows 10 PC via PuTTY. I’ve set the PuTTY (Bash) window title to ‘$PWD’ by setting $PS1 as below: This works well – whenever I change the directory in the shell, the title updates straight away: However, if I change directory in a function (as below) the title doesn’t update until after the