Skip to content

Use “<“ and “>” in an action.conf #3582

Closed Answered by sebres
dBsooner asked this question in Q&A
Discussion options

You must be logged in to vote

Is it possible to use less than (<) and greater than (>) symbols in an action.conf?

Yes it is... Only available tags <token>, where token normally contains alphanumeric, underscore and minus characters, will be replaced recursively (so <primary-<secondary>> form too. Regex for tokens looks like

TAG_CRE = re.compile(r'<([^ <>]+)>')

If you use < and > alone (e. g. separated by spaces from rest of the command, they will be ignored).

Is there a way to escape the <``>?

Yes, one could add something like that in definition or default section:

[DEFAULT]
lt = <
gt = >

And then use <lt> or %(lt)s for < char and <gt> or %(gt)s for >

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@dBsooner
Comment options

Answer selected by sebres
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants