path: root/man
diff options
authorZac Medico <zmedico@gentoo.org>2020-08-31 19:49:50 -0700
committerZac Medico <zmedico@gentoo.org>2020-09-07 17:17:54 -0700
commit03ae0d95797f68cf86748ae3da184f3018e8c64c (patch)
treed30baef482b8dc6e19155ad5ca092e57410f5372 /man
parentenv-update: create systemd user-session environment definition (diff)
emerge --search: auto-detect regular expressions (bug 737480)
Automatically detect regular expressions when the search string contains any of these regular expression characters or character sequences: ^ $ * [ ] { } | ? .+ This simplifies usage, so that users no longer have to remember to prefix regular expressions with the % character. The new behavior can be disabled by --regex-search-auto=n, in case the regular expressions interpretation causes some kind of problem. Note that fuzzy search and regular expression search are mutually exclusive, and fuzzy search remains the default for search strings that do not contain any regular expression characters. Bug: https://bugs.gentoo.org/737480 Signed-off-by: Zac Medico <zmedico@gentoo.org>
Diffstat (limited to 'man')
1 files changed, 11 insertions, 1 deletions
diff --git a/man/emerge.1 b/man/emerge.1
index fe7d05a21..c1bcd0220 100644
--- a/man/emerge.1
+++ b/man/emerge.1
@@ -229,7 +229,9 @@ explicitly discarded by running `emaint \-\-fix cleanresume` (see
.BR \-\-search ", " \-s
Searches for matches of the supplied string in the ebuild repository.
By default emerge uses a case-insensitive simple search, but you can
-enable a regular expression search by prefixing the search string with %.
+enable a regular expression search by prefixing the search string with %
+(the % prefix can often be omitted if the
+\fB\-\-regex\-search\-auto\fR option is enabled).
For example, \fBemerge \-\-search "%^kde"\fR searches for any package whose
name starts with "kde"; \fBemerge \-\-search "%gcc$"\fR searches for any
package that ends with "gcc"; \fBemerge \-\-search "office"\fR searches for
@@ -764,6 +766,14 @@ matching packages due to \fB\-\-rebuild\fR.
A space separated list of package names or slot atoms. Emerge will not rebuild
packages that depend on matching packages due to \fB\-\-rebuild\fR.
+.BR "\-\-regex\-search\-auto < y | n >"
+Enable or disable automatic regular expression detection for search actions.
+If this option is enabled (the default), then regular expression search
+is automatically enabled when the search string is a valid regular expression
+which contains any of these commonly used regular expression characters or
+character sequences:
+^ $ * [ ] { } | ? .+
.BR \-\-oneshot ", " \-1
Emerge as normal, but do not add the packages to the world file
for later updating.