Page 1 of 1

regexes in hints

Posted: 03 Jan 2024 03:34
by owend
In the syntax file I am maintaining, I have many hints.
In cases where there are several words which begin with the same syntax, but which have different meanings, I am not getting the results I need.

For example

echo "some string" - sends the quoted string to the console
echo >"filename" "some string" - Creates a files called "filename" and appends a line containing "some string" + CRLF
echo >>"filename" "some string" - Opens an existing file called "filename" appends a line containing "some string" + CRLF
echo >>>"filename" "some string" - Opens an existing file called "filename" appends "some string" with no CRLF

So each should display a different hint depending on whether the starting text is
echo "
echo >"
echo >>"
echo >>>"

I created type 2 hints as per this image.
hint_styles.png
hint_styles.png (12.07 KiB) Viewed 5320 times

But the resulting hint popup lists all possibilities and only the text of the last one as shown here.
So it seems like I need to have a regex in the hint ID, but this doesn't appear to work.
Can anyone suggest how to achieve what I need?
echo hint.gif
echo hint.gif (94.65 KiB) Viewed 5320 times