Opened 18 years ago
Closed 18 years ago
#3228 closed defect (worksforme)
The ! escape character doesn't handle ` properly
Reported by: | Owned by: | Jonas Borgström | |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | general | Version: | 0.9.5 |
Severity: | normal | Keywords: | |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
I would expect the following:
`echo MPD_SECRETWORD=`!``whoami`!`` > ~/.mpd.conf`
to generate a whole line that is in monospace except for the two backticks. (The first backtick puts us in monospace, the second one takes us out, the exclamation point escapes the third backtick so it is displayed, and the fourth backtick returns us to monospace.) Instead, it generates something like:
echo MPD_SECRETWORD=``whoami! > ~/.mpd.conf
except that the whoami is in a proportional font. I haven't found any combination of exclamation points and backticks that fix this problem.
The main problem is that it is not possible to render a backtick inside a backticked expression, and {{{ !}}} is not always suitable because of its blocked layout.
Attachments (0)
Change History (2)
comment:1 by , 18 years ago
Priority: | normal → lowest |
---|---|
Severity: | normal → trivial |
comment:2 by , 18 years ago
Priority: | lowest → normal |
---|---|
Resolution: | → worksforme |
Severity: | trivial → normal |
Status: | new → closed |
Yeah, normally `
…`
and {{{
…}}}
can be used to escape each other.
So, for your example, you should write:
`{{{echo MPD_SECRETWORD=`whoami` > ~/.mpd.conf}}}`
which renders as: echo MPD_SECRETWORD=`whoami` > ~/.mpd.conf
Downgrading the priority of this, as I now understand that {{{ and !}}} don't necessarily block their text and are a suitable replacement for backticks in this case.