From action:Prompt With List [Keyboard Maestro Wiki]
If you want to display a “friendly” value as the default value, but store a different value (like a code), you can do this by using a code followed by two underscores (
__) and then the value
The separator between the “friendly” display value and the data value is the rightmost pair of double underscores.
As I see others have noted too, this convention means that if the data value contains double underscores, the split between display and data values will be incorrect, e.g.
Source__https://example.com/8390/9969__8959
will be split into a display value of:
Source__https://example.com/8390/9969
and a data value of:
__8959
In regex parlance, the match is greedy rather than lazy.
This can be worked around by such tricks as using a search and replace action to change double underscores to a temporary character before the prompt with list action is used and then using search and replace again afterwards to reinstate any double underscores in the selected data value. However, that seems a bit of a hack, and it would be more elegant if KM could provide a flag for the positioning of the split indicator.
Perhaps in the cog for the action there could be a “rightmost display split
“ option? (Or “greedy friends
” or “lazy friends
”!)