summaryrefslogtreecommitdiff
path: root/test/normal/codepoint-width/tab-width
diff options
context:
space:
mode:
authorMaxime Coste <mawww@kakoune.org>2018-05-21 22:22:34 +1000
committerMaxime Coste <mawww@kakoune.org>2018-07-05 07:54:28 +1000
commitc829595d017eb2bddb059dd984d047819827723b (patch)
tree50f7cf5b5cd8f14ada48d5b8b29b76ad19ca5c17 /test/normal/codepoint-width/tab-width
parentcad5f37efd4d4178d0f6942df063074e9ab7e686 (diff)
Refactor command line parsing
Command line parsing now works as follow: * Quoted strings ('...', "..." and %~...~ with '~' non nestable) use 'doubling-up' for escaping their delimiter, if the delimiter appears twice in a row, it is considered as part of the string and represent one delimiter character. So 'abc''def' == "abc'def". No other escaping takes place in those strings. * Balanced strings (%{...}) do not support any kind of escaping, but finds the matching closing delimiter by taking nesting into account. So %{abc{def}} == "abc{def}". * Non quoted words support escaping of `;` and whitespaces with `\`, `%`, `'` and '"` can be escaped with `\` at the start of the word, they do not need escaping (and will not be escaped) else where in a word where they are treated literally. Any other use of '\' is a literal '\'. So \%abc%\;\ def == "%abc%; def" As discussed in #2046 this should make our command line syntax more robust, provide a simple programmatic way to escape a string content (s/<delim>/<delim><delim>/g), be well defined instead of ad-hoc undocumented behaviour, and interact nicely with other common escaping by avoiding escaping hell (:grep <regex> can in most case be written with the regex unquoted).
Diffstat (limited to 'test/normal/codepoint-width/tab-width')
0 files changed, 0 insertions, 0 deletions