settings: enable regexes by default and add support for perl syntax
This commit is contained in:
2
NEWS
2
NEWS
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user