diff options
author | Andrzej Rybczak <electricityispower@gmail.com> | 2015-05-02 15:05:50 +0200 |
---|---|---|
committer | Andrzej Rybczak <electricityispower@gmail.com> | 2015-05-02 15:06:11 +0200 |
commit | 8f646e0f5cfd355fa1b9b1b93255c23a96c049bf (patch) | |
tree | 7bf5a614a84fcd52767a0c0a8fb5fa8fb276ab07 | |
parent | dafcadefafc3829fca5a585026b702b73c2ced1a (diff) |
settings: enable regexes by default and add support for perl syntax
-rw-r--r-- | NEWS | 2 | ||||
-rw-r--r-- | doc/config | 4 | ||||
-rw-r--r-- | doc/ncmpcpp.1 | 2 | ||||
-rw-r--r-- | src/settings.cpp | 4 |
4 files changed, 8 insertions, 4 deletions
@@ -15,6 +15,8 @@ ncmpcpp-0.7 (????-??-??) * Current MPD host may now be shown in playlist (playlist_show_mpd_host configuration variable, disabled by default). * Random album artists can now be added to the playlist. * Case insensitive searching is now Unicode aware as long as boost was compiled with ICU support. +* Searching with regular expressions are now enabled by default. +* Support for the Perl regular expression syntax was added. ncmpcpp-0.6.3 (2015-03-02) @@ -432,9 +432,9 @@ # #display_remaining_time = no # -## Available values: none, basic, extended. +## Available values: none, basic, extended, perl. ## -#regular_expressions = none +#regular_expressions = basic # ## ## Note: If below is enabled, ncmpcpp will ignore leading diff --git a/doc/ncmpcpp.1 b/doc/ncmpcpp.1 index 52f0aeba..3672b172 100644 --- a/doc/ncmpcpp.1 +++ b/doc/ncmpcpp.1 @@ -287,7 +287,7 @@ If enabled, bitrate of currently playing song will be displayed in statusbar. .B display_remaining_time = yes/no If enabled, remaining time of currently playing song will be be displayed in statusbar instead of elapsed time. .TP -.B regular_expressions = basic/extended +.B regular_expressions = none/basic/extended/perl Type of currently used regular expressions. .TP .B ignore_leading_the = yes/no diff --git a/src/settings.cpp b/src/settings.cpp index 1574385a..9ef1b23e 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -578,10 +578,12 @@ bool Configuration::read(const std::vector<std::string> &config_paths) regex_type = boost::regex::basic; else if (v == "extended") regex_type = boost::regex::extended; + else if (v == "perl") + regex_type = boost::regex::perl; else throw std::runtime_error("invalid argument: " + v); regex_type |= boost::regex::icase; - }, defaults_to(regex_type, boost::regex::literal | boost::regex::icase) + }, defaults_to(regex_type, boost::regex::basic | boost::regex::icase) )); p.add("ignore_leading_the", yes_no( ignore_leading_the, false |