summaryrefslogtreecommitdiff
path: root/Master/texmf
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2010-10-10 17:18:11 +0000
committerNorbert Preining <preining@logic.at>2010-10-10 17:18:11 +0000
commit01c272210806a13e48037a7ed53798e59d6dd4d2 (patch)
treed9747a6f82971f44f65893181f2bd4e56c371a72 /Master/texmf
parent1f29e6f46a7cdad0cd6573507cc6de055bac9c40 (diff)
support searching for words only in tlmgr (tlmgr search --word)
git-svn-id: svn://tug.org/texlive/trunk@20038 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf')
-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