Don't escape '#' in some cases where it's not necessary

This is useful for the next commit where tab completion produces
tokens like "foo#bar". Some cases are missing though, because we
still need to tell this function what's the previous character.
I guess next commit could also use a different sigil.
This commit is contained in:
Johannes Altmanninger
2025-11-05 13:44:42 +01:00
parent cc95cef165
commit 2c68a6704f
2 changed files with 11 additions and 3 deletions

View File

@@ -305,7 +305,10 @@ string escape --style=script 'a b#c"\'d'
# CHECK: 'a b#c"\'d'
string escape --no-quoted --style=script 'a b#c"\'d'
# CHECK: a\ b\#c\"\'d
# CHECK: a\ b#c\"\'d
string escape --no-quoted --style=script 'a #b'
# CHECK: a\ \#b
string escape --style=url 'a b#c"\'d'
# CHECK: a%20b%23c%22%27d