I am running screen inside Mac OSX Terminal app (bash).
Here is the screenrc (got it from here):
$ cat ~/.screenrc
termcapinfo xterm* ti@:te@
startup_message off
defutf8 on
shelltitle "$ |what?" # make screen assign window titles automatically
hardstatus alwayslastline
hardstatus string '%{= kw} [ %{= kb}%H%{= kw} ][%= %{= kw}%?%-Lw?%{= kW}%n*%f %t%?%?%{= kw}%?%+Lw%?%?%= ][ %{r}%l%{w} ]%{w}[%{r} %m/%d/%y/ %C %A %{w}]%{w}'
$
As can be seen I do have the line to show the current process name as the title in screen:
shelltitle "$ |what?" # make screen assign window titles automatically
But inside screen I just see "what?" (the default) instead of the process-name. Which suggests that "$" is not working.
What am I missing? And how does the "$ |something-else" work?