rc ctags: Escape backslash in {\} faces

Using `{\}` in an Awk script results in the following error being printed:

```
awk: cmd. line:18: warning: escape sequence `\}' treated as plain `}'
```
This commit is contained in:
Frank LENORMAND 2020-01-28 10:05:10 +00:00 committed by GitHub
parent 2749093143
commit 5ea2f26efa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -57,7 +57,7 @@ define-command -params ..1 \
menu_info = $3; gsub("!", "!!", menu_info);
edit_path = path($2); gsub("!", "!!", edit_path); gsub("#", "##", edit_path); gsub("&", "&&", edit_path); gsub("\\|", "||", edit_path);
line_number = $3;
out = out "%!" menu_item ": {MenuInfo}{\}" menu_info "! %!evaluate-commands %# try %& edit -existing %|" edit_path "|; execute-keys %|" line_number "gx| & catch %& fail unable to find tag &; try %& execute-keys %|s\\Q" select "<ret>| & # !"
out = out "%!" menu_item ": {MenuInfo}{\\}" menu_info "! %!evaluate-commands %# try %& edit -existing %|" edit_path "|; execute-keys %|" line_number "gx| & catch %& fail unable to find tag &; try %& execute-keys %|s\\Q" select "<ret>| & # !"
}
END { print ( length(out) == 0 ? "fail no such tag " ENVIRON["tagname"] : "menu -markup -auto-single " out ) }
# Ensure x is an absolute file path, by prepending with tagroot