diff options
| author | Frank LENORMAND <lenormf@gmail.com> | 2020-01-28 10:05:10 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-01-28 10:05:10 +0000 |
| commit | 5ea2f26efaad0ae9c6e6417bc33631a7e493cd59 (patch) | |
| tree | ee29937ed1bc5604ce0d734a61b8b21c096b5ffa | |
| parent | 2749093143fe5cdbda306569bdb88ff8162486e9 (diff) | |
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 `}'
```
| -rw-r--r-- | rc/tools/ctags.kak | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/rc/tools/ctags.kak b/rc/tools/ctags.kak index b39eeb66..31e67a8f 100644 --- a/rc/tools/ctags.kak +++ b/rc/tools/ctags.kak @@ -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 |
