Implement support for specifying negated match

- Prepending - inverts the matching result.
- Fix logic window/drun browser.
- Breaks API as argument token_match callback changed.
- Update tests.

Fixes: #665
This commit is contained in:
Dave Davenport
2017-09-29 08:32:09 +02:00
parent a1ea3e268f
commit ebffe5503d
19 changed files with 83 additions and 57 deletions

View File

@@ -61,14 +61,14 @@ int helper_parse_setup ( char * string, char ***output, int *length, ... );
*
* @returns a newly allocated array of regex objest
*/
GRegex **tokenize ( const char *input, int case_sensitive );
rofi_int_matcher **tokenize ( const char *input, int case_sensitive );
/**
* @param tokens Array of regex objects
*
* Frees the array of regex expressions.
*/
void tokenize_free ( GRegex ** tokens );
void tokenize_free ( rofi_int_matcher ** tokens );
/**
* @param key The key to search for
@@ -136,7 +136,7 @@ int find_arg ( const char * const key );
*
* @returns TRUE when matches, FALSE otherwise
*/
int helper_token_match ( GRegex * const *tokens, const char *input );
int helper_token_match ( rofi_int_matcher * const *tokens, const char *input );
/**
* @param cmd The command to execute.
*