Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

4
  • 1
    xterm has no problems with spaces in titles, and has no need to change spaces into %20. Do you see the correct results with printf '\033]0;%s\007' "$PWD"' ; sleep 30 - at least for 30 seconds? Commented Oct 28, 2019 at 6:10
  • why the sleep? would that not delay the entire shell read, eval, print loop? Commented Oct 28, 2019 at 14:14
  • icarus: this advice did you work? have you personally tested? Commented Oct 28, 2019 at 14:20
  • 1
    The point of the sleep is to stop either PS1 or PROMPT_COMMAND or something like them changing the title again immediately after the printf has set it, leading you to think it hadn't worked. Yes I tested it for an xterm. Commented Oct 28, 2019 at 16:58