Adding regexp to configuration.

This commit is contained in:
Martin Dvorak 2014-04-27 07:42:17 +02:00
parent 093fc012b2
commit fbdfafb466
2 changed files with 7 additions and 0 deletions

View file

@ -72,6 +72,9 @@ Configuration options:
\fIhicolor\fR
Get more colors with this option (default is monochromatic).
\fIregexp\fR
Search command history using regular expressions (exact match is default)
\fIcasesensitive\fR
Make the pattern-based filtering case sensitive (it's case insensitive by default).

View file

@ -208,6 +208,9 @@ void hstr_get_env_configuration(Hstr *hstr)
if(strstr(hstr_config,HH_CONFIG_CASE)) {
hstr->caseSensitive=HH_CASE_SENSITIVE;
}
if(strstr(hstr_config,HH_CONFIG_REGEXP)) {
hstr->historyMatch=HH_MATCH_REGEXP;
}
if(strstr(hstr_config,HH_CONFIG_SORTING)) {
hstr->historyView=HH_VIEW_HISTORY;
} else {
@ -215,6 +218,7 @@ void hstr_get_env_configuration(Hstr *hstr)
hstr->historyView=HH_VIEW_FAVORITES;
}
}
if(strstr(hstr_config,HH_CONFIG_DEBUG)) {
hstr->debugLevel=HH_DEBUG_LEVEL_DEBUG;
} else {