Skip to content

Commit 0723d6b

Browse files
committed
docs(add): double quotes must be escaped [towards #10]
1 parent cf4999a commit 0723d6b

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

README.md

+7
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,13 @@ abbr a=b\;c # allowed
212212
abbr a="b|c" # allowed
213213
```
214214
215+
**Note:** when saved for cross-session use, user abbreviations' EXPANSIONs are wrapped in double quotes (`"`), _even if single quotes (`'`) were originally used._ For this reason, double quotation marks should always be escaped. See issue #10.
216+
217+
```shell
218+
abbr a='a"b"c' # bad - will turn into `"a"b"c"`, which will error
219+
abbr a='a\"b\"c' # good
220+
```
221+
215222
User-scope abbreviations can also be manually to the user abbreviations file. See **Storage** below.
216223
217224
The session regular, session global, user regular, and user global abbreviation sets are independent. If you wanted, you could have more than one abbreviation with the same ABBREVIATION. Order of precedence is "session command > user command > session global > user global".

0 commit comments

Comments
 (0)