Skip to content

Commit

Permalink
add ubuntu package search
Browse files Browse the repository at this point in the history
  • Loading branch information
adamv committed Aug 15, 2013
1 parent f9d17dd commit 06d4584
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Library/Contributions/manpages/brew.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ Note that these flags should only appear after a command.
surrounded with slashes, then it is interpreted as a regular expression.
If no search term is given, all available formula are displayed.

* `search --debian`|`--fedora`|`--fink`|`--macports`|`--opensuse` <text>:
* `search --debian`|`--fedora`|`--fink`|`--macports`|`--opensuse`|`--ubuntu` <text>:
Search for <text> in the given package manager's list.

* `sh [--env=std]`:
Expand Down
2 changes: 2 additions & 0 deletions Library/Homebrew/cmd/search.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ def search
exec_browser "http://software.opensuse.org/search?q=#{ARGV.next}"
elsif ARGV.include? '--fedora'
exec_browser "https://admin.fedoraproject.org/pkgdb/acls/list/*#{ARGV.next}*"
elsif ARGV.include? '--ubuntu'
exec_browser "http://packages.ubuntu.com/search?keywords=#{ARGV.next}&searchon=names&suite=all&section=all"
elsif (query = ARGV.first).nil?
puts_columns Formula.names
else
Expand Down
2 changes: 1 addition & 1 deletion share/man/man1/brew.1
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ If \fB\-\-force\fR is passed, and there are multiple versions of \fIformula\fR i
Perform a substring search of formula names for \fItext\fR\. If \fItext\fR is surrounded with slashes, then it is interpreted as a regular expression\. If no search term is given, all available formula are displayed\.
.
.TP
\fBsearch \-\-debian\fR|\fB\-\-fedora\fR|\fB\-\-fink\fR|\fB\-\-macports\fR|\fB\-\-opensuse\fR \fItext\fR
\fBsearch \-\-debian\fR|\fB\-\-fedora\fR|\fB\-\-fink\fR|\fB\-\-macports\fR|\fB\-\-opensuse\fR|\fB\-\-ubuntu\fR \fItext\fR
Search for \fItext\fR in the given package manager\'s list\.
.
.TP
Expand Down

0 comments on commit 06d4584

Please sign in to comment.