summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xMaster/texmf/scripts/texlive/tlmgr.pl13
1 files changed, 12 insertions, 1 deletions
diff --git a/Master/texmf/scripts/texlive/tlmgr.pl b/Master/texmf/scripts/texlive/tlmgr.pl
index 8312e6f0d32..78754d16df0 100755
--- a/Master/texmf/scripts/texlive/tlmgr.pl
+++ b/Master/texmf/scripts/texlive/tlmgr.pl
@@ -164,6 +164,7 @@ sub main {
"all" => 1,
"force" => 1 },
"search" => { "global" => 1,
+ "word" => 1,
"file" => 1 },
"show" => { "list" => 1 },
"uninstall" => { "force" => 1 },
@@ -1154,7 +1155,11 @@ sub action_search {
$t |= "";
my $lt = $tlpdb->get_package($pkg)->longdesc;
$lt |= "";
- if (($pkg =~ m/$r/) || ($t =~ m/$r/) || ($lt =~ m/$r/)) {
+ my $pat = $r;
+ if ($opts{"word"}) {
+ $pat = '\W' . $r . '\W';
+ }
+ if (($pkg =~ m/$pat/) || ($t =~ m/$pat/) || ($lt =~ m/$pat/)) {
$ret .= " $pkg - $t\n";
}
}
@@ -5314,6 +5319,12 @@ List all filenames containing I<what>.
Search the TeX Live Database of the installation medium, instead of the
local installation.
+=item B<--word>
+
+Restrict the search to match only full words. As an example searching
+for C<table> with this option will not output packages containing
+the the word C<tables> unless they also contain the word C<table>.
+
=back