diff options
author | Steve Bennett <steveb@workware.net.au> | 2020-05-07 09:21:23 +1000 |
---|---|---|
committer | Steve Bennett <steveb@workware.net.au> | 2020-05-07 09:23:37 +1000 |
commit | a6c24e9c1a78da2ae9a5d5e6a110f26da40ac143 (patch) | |
tree | 87f009623110e373dceb5fc082e62147ffcf2aa1 /jim.h | |
parent | 659f043196f313c69e32876e3641d0865a1e49cd (diff) | |
download | jimtcl-a6c24e9c1a78da2ae9a5d5e6a110f26da40ac143.zip jimtcl-a6c24e9c1a78da2ae9a5d5e6a110f26da40ac143.tar.gz jimtcl-a6c24e9c1a78da2ae9a5d5e6a110f26da40ac143.tar.bz2 |
lsearch, switch: fix -regexp case with option-like pattern
If the pattern begins with -, the internal invocation of regexp
will treat the pattern as an option. Fix this by adding -- to the
internal invocation of regexp.
Fixes #154
Reported-by: Barry Arthur <barry.arthur@gmail.com>
Signed-off-by: Steve Bennett <steveb@workware.net.au>
Diffstat (limited to 'jim.h')
-rw-r--r-- | jim.h | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -161,6 +161,7 @@ extern "C" { /* Flags used by API calls getting a 'nocase' argument. */ #define JIM_CASESENS 0 /* case sensitive */ #define JIM_NOCASE 1 /* no case */ +#define JIM_OPT_END 2 /* if implemented by a command (e.g. regexp), add -- to the argument list */ /* Filesystem related */ #define JIM_PATH_LEN 1024 |