summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--DOCS/man/input.rst10
-rw-r--r--input/cmd.c4
2 files changed, 7 insertions, 7 deletions
diff --git a/DOCS/man/input.rst b/DOCS/man/input.rst
index b8eef24d24..12cb75afde 100644
--- a/DOCS/man/input.rst
+++ b/DOCS/man/input.rst
@@ -162,7 +162,7 @@ a number of other places.
|
| ``<command> ::= [<prefixes>] <command_name> (<argument>)*``
-| ``<argument> ::= (<unquoted> | " <double_quoted> " | !X <custom_quoted> X!)``
+| ``<argument> ::= (<unquoted> | " <double_quoted> " | `X <custom_quoted> X`)``
``command_name`` is an unquoted string with the command name itself. See
`List of Input Commands`_ for a list.
@@ -171,10 +171,10 @@ Arguments are separated by whitespaces even if the command expects only one
argument. Arguments with whitespaces or other special characters must be quoted,
or the command cannot be parsed correctly.
-Double quoted arguments start and end with ``"``. Custom quotes start with ``!``
-(exclamation mark) followed by any ASCII character, and end in the same pair in
-reverse order, e.g. ``!'foo'!`` or ``!-bar-!``. The final pair sequence is not
-allowed inside the string - in these examples ``'!`` and ``-!`` respectively.
+Double quoted arguments start and end with ``"``. Custom quotes start with `````
+(back-quote) followed by any ASCII character, and end in the same pair in
+reverse order, e.g. ```-foo-``` or ````bar````. The final pair sequence is not
+allowed inside the string - in these examples ``-``` and `````` respectively.
Custom quotes take their content literally, while inside double quotes
JSON/C-style escaping can be used. JSON escapes according to RFC 8259, minus
diff --git a/input/cmd.c b/input/cmd.c
index 3d3b7c6587..9f0c758b0c 100644
--- a/input/cmd.c
+++ b/input/cmd.c
@@ -341,8 +341,8 @@ static int pctx_read_token(struct parse_ctx *ctx, bstr *out)
}
return 1;
}
- if (ctx->start.len > 1 && bstr_eatstart0(&ctx->str, "!")) {
- char endquote[2] = {ctx->str.start[0], '!'};
+ if (ctx->start.len > 1 && bstr_eatstart0(&ctx->str, "`")) {
+ char endquote[2] = {ctx->str.start[0], '`'};
ctx->str = bstr_cut(ctx->str, 1);
int next = bstr_find(ctx->str, (bstr){endquote, 2});
if (next < 0) {