diff options
author | Tom Most <twm@freecog.net> | 2021-04-01 21:17:22 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-02 06:17:22 +0200 |
commit | 7ef3caf542c82c362a532ac46cb0e680cbc63347 (patch) | |
tree | e17cd2249ea3c5e812b2b9ca59a7603bb1192514 | |
parent | 6bc2efd8bf16194ea8b0c8957c451deff0647653 (diff) |
docs: Quote PWD in window title example (#2539)
Quote expansion of $PWD to prevent word-splitting of its value, which
gives an incorrect result if there is a single space and an error
message if there is more than one space:
❯ basename /tmp/foo
foo
❯ basename /tmp/foo bar
foo
❯ basename /tmp/foo bar baz
basename: extra operand ‘baz’
Try 'basename --help' for more information.
-rw-r--r-- | docs/advanced-config/README.md | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/docs/advanced-config/README.md b/docs/advanced-config/README.md index ed6bb7c0f..061a3233b 100644 --- a/docs/advanced-config/README.md +++ b/docs/advanced-config/README.md @@ -80,7 +80,7 @@ add the following snippet to your `~/.bashrc` or `~/.zshrc`: ```bash function set_win_title(){ - echo -ne "\033]0; $(basename $PWD) \007" + echo -ne "\033]0; $(basename "$PWD") \007" } starship_precmd_user_func="set_win_title" ``` |