Xu Cheng
80514ee5d7
desc: better way to handle options
...
We allow to use options like --verbose and --debug for all commands.
And we should support switch format options, e.g. `brew desc -vs foo`
2015-09-10 13:37:57 +08:00
Dan Martinez
8374374168
Improve description searching and add a cache.
...
Closes Homebrew/homebrew#42281 .
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-09-08 15:23:37 +01:00
Alex Dunn
79ea14b738
cmd/search: fix filtering of aliases in results
...
By directly modifying the results array with
`results[i] = "#{name} (installed)"`, it appeared on successive
iterations that the canonical name was no longer in the array, so
aliases were not removed.
See 9efe5b554c (commitcomment-12969631)
Closes Homebrew/homebrew#43433 .
2015-08-31 07:54:59 -07:00
Alex Dunn
431ebba7af
cmd/search: mark installed formulae
...
`brew search emacs`, with homebrew/emacs tapped:
```
real 0m2.586s
user 0m1.138s
sys 0m0.121s
```
Previously:
```
real 0m2.831s
user 0m1.385s
sys 0m0.087s
```
`brew search s`:
```
real 0m2.260s
user 0m1.201s
sys 0m0.114s
```
Previously:
```
real 0m5.953s
user 0m4.827s
sys 0m0.226s
```
Closes Homebrew/homebrew#35696 .
Closes Homebrew/homebrew#42662 .
2015-08-30 11:29:13 -07:00
Xu Cheng
d62095710f
More core files style updates
2015-08-03 20:38:20 +08:00
BrewTestBot
13d544e11e
Core files style updates.
...
Closes Homebrew/homebrew#42354 .
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-08-03 13:22:35 +01:00
Alex Dunn
48df76dc89
cmd/search --desc: bold formula names
...
Closes Homebrew/homebrew#40717 .
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-07-08 13:56:00 +01:00
Xu Cheng
6af47815b0
search: cache remote tap formulae
...
Closes Homebrew/homebrew#40775 .
Signed-off-by: Xu Cheng <xucheng@me.com>
2015-06-18 14:46:29 +08:00
Baptiste Fontaine
4648aa54c0
search --desc: cache the query regexp
...
Closes Homebrew/homebrew#40795 .
Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
2015-06-17 08:43:01 +02:00
Xu Cheng
938dc356c1
add official_taps
2015-06-01 20:08:41 +08:00
Xu Cheng
c1830828b2
search: use Formula#full_name
2015-05-29 17:02:22 +08:00
Xu Cheng
e2b0bca931
add Formula.core_names Formula.tap_names and Formula.full_names
2015-05-27 13:53:40 +08:00
Nikolaus Wittenstein
148cafa9cd
brew search
can take a --desc
argument to search descriptions
2015-05-25 17:23:50 +01:00
Dominyk Tiller
ec7b513a53
search: add homebrew/tex to search params
...
Closes Homebrew/homebrew#38855 .
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-04-24 18:35:06 +01:00
Alex Dunn
d85f2dabca
cmd/search: notification on attempted regex searches
...
Closes Homebrew/homebrew#38760 .
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-04-21 10:54:29 +01:00
Baptiste Fontaine
e5c1f5115c
search: fix --fedora URL.
...
Closes Homebrew/homebrew#37155 .
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-02-25 08:30:48 +00:00
Viktor Szakats
fc2818b7a5
Use more https in urls and updated some lost links
...
Closes Homebrew/homebrew#35531 .
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2015-01-04 02:13:16 -05:00
Misty De Meo
d57fe3eded
search: add homebrew-x11 to default taps
2014-12-28 18:42:20 -08:00
Mike McQuaid
52cda8fd80
Allow searching/installing Homebrew Casks.
...
People want to install things like GIMP using Homebrew so let's make it
easier for them to find a decent installation method.
Closes Homebrew/homebrew#34496 .
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2014-11-30 17:59:02 +00:00
Jack Nagel
10a1952d2c
Only "extend self" once on the Homebrew module
2014-06-19 13:10:36 -05:00
Jack Nagel
0291a579fb
Respect tap directory layout when searching
...
This matches the logic in find_formula.
2014-04-27 17:28:19 -05:00
Jack Nagel
ccc62a0cad
Use canonical_name to canonicalize aliases
2014-04-27 16:03:32 -05:00
Jack Nagel
82047ed901
Search results should always be sorted
2014-04-27 16:03:08 -05:00
Jack Nagel
3b15b58d00
Use Formulary.factory to find formula in taps
2014-04-27 15:32:28 -05:00
Jack Nagel
bdee729a41
Yield absolute paths from find_formula
2014-04-25 18:58:16 -05:00
Tsukasa OMOTO
54004a4759
Make the on-disk representation of taps unambiguous
...
This commit supports "-" and "_" in names of user and repository.
Closes Homebrew/homebrew#28203 .
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2014-04-24 17:10:41 -05:00
Mike McQuaid
daa7b7b6db
search: move nginx to Homebrew organisation.
2014-04-18 10:59:12 +01:00
Mike McQuaid
513a1f2ebd
Migrate homebrew-php to Homebrew organization.
2014-04-10 16:22:24 +01:00
Jack Nagel
7bdaa7ffe1
search: use a queue to collect errors
...
The threading in the tap search code makes handling errors difficult. If
an API-related error is raised in one thread, it is likely to be raised
in each of the rest as well. This results in duplicated error messages,
which is ugly and bad UX.
This patch adds a synchronized queue to collect these exceptions. The
first one added to the queue is re-raised after all operations are
complete.
It's not ideal, but it's minimally invasive and I don't have the energy
or time to do a rewrite.
2014-02-16 23:19:09 -05:00
Jack Nagel
a7b515e503
Use a more accurate method name and drop unhelpful block
2014-02-13 23:22:43 -05:00
Jack Nagel
345457b33e
Pass the string instead of reconstructing it from a regexp
2014-02-12 13:59:18 -05:00
Jack Nagel
d01c671d74
Drop unnecessary map + compact in search_tap
2014-02-08 17:53:08 -05:00
Jack Nagel
7d4709d9d6
Prevent repeated warnings when GitHub API rate limit is exceeded
2014-02-08 16:04:53 -05:00
Jack Nagel
2e3871c076
Raise only GitHub::Error from GitHub.open
2014-02-08 16:04:53 -05:00
Jack Nagel
4d6df3e3bc
Parse JSON early in GitHub module
2014-02-08 16:04:53 -05:00
Jack Nagel
f7e1244e6d
Don't mutate argument in search_tap
2014-02-08 16:04:52 -05:00
Mike McQuaid
30e409adfd
search: handle tap not found and suggest update.
...
Closes Homebrew/homebrew#25706 .
Closes Homebrew/homebrew#25682 .
2014-01-09 17:20:54 +00:00
Mike McQuaid
5b95710254
homebrew-python has moved to Homebrew org.
2013-12-28 12:14:38 +00:00
Adam Vandenberg
f37e84d766
retire homebrew/x11
...
Closes Homebrew/homebrew#24405 .
2013-11-17 12:20:28 -08:00
David MacMahon
a999ddc002
Add HOMEBREW_NO_GITHUB_API env var.
...
This patch allows users to "opt out" of using the GitHub API altogether
by setting the HOMEBREW_NO_GITHUB_API environment variable. The
value of the environment variable does not matter (it can even be
empty!).
For Bash/ZSH: export HOMEBREW_NO_GITHUB_API=1
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2013-10-25 21:12:28 +01:00
Mike McQuaid
98b28f5ac3
Different regex for user/tap/formula and user/tap.
...
Closes Homebrew/homebrew#23430 .
2013-10-22 11:58:40 +01:00
Mike McQuaid
077f09e4ea
global: unify tap regex.
...
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2013-10-21 18:53:24 +01:00
Samuel John
9b755e5ad2
brew search <user>/<repo> [substring]
...
For example `brew search homebrew/science` to get a list of all formulae
from that tap, even if not yet tapped.
`brew search <user>/<repo>/<substr>` or
`brew search <user>/<repo> <substr>` to grep for `<substr>`
inside of the tap `<user>/<repo>`.
2013-09-03 11:52:34 +02:00
Adam Vandenberg
31348c34ae
add ubuntu package search
2013-08-14 22:14:35 -07:00
Adam Vandenberg
bcaa823538
Add fedora to brew search
2013-08-09 09:32:51 -07:00
Adam Vandenberg
5600713bbb
Add opensuse package search
2013-08-05 15:05:02 -07:00
Adam Vandenberg
1540b3aadd
Search marcqualie/nginx
...
Closes Homebrew/homebrew#21678 .
2013-08-05 13:32:23 -07:00
Adam Vandenberg
583dd38b08
Add homebrew-binary to search
2013-08-03 10:27:45 -07:00
Jack Nagel
366cb87aec
search: silence JSON decode errors
...
Closes Homebrew/homebrew#21506 .
Closes Homebrew/homebrew#21508 .
2013-07-28 15:38:46 -05:00
Jack Nagel
6b299c4207
Clarify behavior of brew search
without an argument
...
As documented in the man page, when given no arguments, `brew search`
will list all formulae. This is different than giving an *empty*
argument.
2013-07-15 10:59:00 -05:00