From aaf2a397f0252dc62ae3bac6bb28594100c2e181 Mon Sep 17 00:00:00 2001 From: Jack Nagel <jacknagel@gmail.com> Date: Tue, 13 Nov 2012 16:50:19 -0600 Subject: [PATCH] Document some recently added options --- Library/Contributions/brew_bash_completion.sh | 14 ++++---------- Library/Contributions/manpages/brew.1.md | 14 +++++++++----- share/man/man1/brew.1 | 16 +++++++++++----- 3 files changed, 24 insertions(+), 20 deletions(-) diff --git a/Library/Contributions/brew_bash_completion.sh b/Library/Contributions/brew_bash_completion.sh index a645ebeaac..848f9fb9f3 100644 --- a/Library/Contributions/brew_bash_completion.sh +++ b/Library/Contributions/brew_bash_completion.sh @@ -118,7 +118,7 @@ _brew_create () local cur="${COMP_WORDS[COMP_CWORD]}" case "$cur" in --*) - __brewcomp "--autotools --cmake --no-fetch" + __brewcomp "--autotools --cmake --no-fetch --set-name --set-version" return ;; esac @@ -221,14 +221,8 @@ _brew_link () local cur="${COMP_WORDS[COMP_CWORD]}" case "$cur" in --*) - if __brewcomp_words_include "--dry-run"; then - return - elif __brewcomp_words_include "--force"; then - return - else - __brewcomp "--dry-run --force" - return - fi + __brewcomp "--dry-run --overwrite" + return ;; esac __brew_complete_installed @@ -338,7 +332,7 @@ _brew_uses () local cur="${COMP_WORDS[COMP_CWORD]}" case "$cur" in --*) - __brewcomp "--installed" + __brewcomp "--installed --recursive" return ;; esac diff --git a/Library/Contributions/manpages/brew.1.md b/Library/Contributions/manpages/brew.1.md index 21839477f2..521838e020 100644 --- a/Library/Contributions/manpages/brew.1.md +++ b/Library/Contributions/manpages/brew.1.md @@ -64,7 +64,7 @@ For the full command list, see the COMMANDS section. versions of formula. Note downloads for any installed formula will still not be deleted. If you want to delete those too: `rm -rf $(brew --cache)` - * `create [--autotools|--cmake] [--no-fetch]` <URL>: + * `create [--autotools|--cmake] [--no-fetch] [--set-name <name>] [--set-version <version>]` <URL>: Generate a formula for the downloadable file at <URL> and open it in `EDITOR`. Homebrew will attempt to automatically derive the formula name and version, but if it fails, you'll have to make your own template. The wget @@ -76,6 +76,9 @@ For the full command list, see the COMMANDS section. If `--no-fetch` is passed, Homebrew will not download <URL> to the cache and will thus not add the MD5 to the formula for you. + The options `--set-name` and `--set-version` each take an argument and allow + you to explicitly set the name and version of the package you are creating. + * `deps [--1] [-n] [--tree] [--all]` <formula>: Show <formula>'s dependencies. @@ -88,7 +91,7 @@ For the full command list, see the COMMANDS section. If `--all` is passed, show dependencies for all formulae. - * `diy [--set-name] [--set-version]`: + * `diy [--set-name <name>] [--set-version <version>]`: Automatically determine the installation prefix for non-Homebrew software. Using the output from this command, you can install your own software into @@ -289,9 +292,10 @@ For the full command list, see the COMMANDS section. If <formulae> are given, upgrade only the specified brews. - * `uses [--installed]` <formula>: - Show the formulas that specify <formula> as a dependency. The list is - not recursive; only one level of dependencies is resolved. + * `uses [--installed] [--recursive]` <formula>: + Show the formulas that specify <formula> as a dependency. + + Use `--recursive` to resolve more than one level of dependencies. If `--installed` is passed, only list installed formulae. diff --git a/share/man/man1/brew.1 b/share/man/man1/brew.1 index 4113a999b8..51a4ce081f 100644 --- a/share/man/man1/brew.1 +++ b/share/man/man1/brew.1 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "BREW" "1" "October 2012" "Homebrew" "brew" +.TH "BREW" "1" "November 2012" "Homebrew" "brew" . .SH "NAME" \fBbrew\fR \- The missing package manager for OS X @@ -74,7 +74,7 @@ If \fB\-n\fR is passed, show what would be removed, but do not actually remove a If \fB\-s\fR is passed, scrubs the cache, removing downloads for even the latest versions of formula\. Note downloads for any installed formula will still not be deleted\. If you want to delete those too: \fBrm \-rf $(brew \-\-cache)\fR . .TP -\fBcreate [\-\-autotools|\-\-cmake] [\-\-no\-fetch]\fR \fIURL\fR +\fBcreate [\-\-autotools|\-\-cmake] [\-\-no\-fetch] [\-\-set\-name <name>] [\-\-set\-version <version>]\fR \fIURL\fR Generate a formula for the downloadable file at \fIURL\fR and open it in \fBEDITOR\fR\. Homebrew will attempt to automatically derive the formula name and version, but if it fails, you\'ll have to make your own template\. The wget formula serves as a simple example\. . .IP @@ -83,6 +83,9 @@ If \fB\-\-autotools\fR is passed, create a basic template for an Autotools\-styl .IP If \fB\-\-no\-fetch\fR is passed, Homebrew will not download \fIURL\fR to the cache and will thus not add the MD5 to the formula for you\. . +.IP +The options \fB\-\-set\-name\fR and \fB\-\-set\-version\fR each take an argument and allow you to explicitly set the name and version of the package you are creating\. +. .TP \fBdeps [\-\-1] [\-n] [\-\-tree] [\-\-all]\fR \fIformula\fR Show \fIformula\fR\'s dependencies\. @@ -100,7 +103,7 @@ If \fB\-\-tree\fR is passed, show dependencies as a tree\. If \fB\-\-all\fR is passed, show dependencies for all formulae\. . .TP -\fBdiy [\-\-set\-name] [\-\-set\-version]\fR +\fBdiy [\-\-set\-name <name>] [\-\-set\-version <version>]\fR Automatically determine the installation prefix for non\-Homebrew software\. . .IP @@ -323,8 +326,11 @@ Upgrade outdated brews\. If \fIformulae\fR are given, upgrade only the specified brews\. . .TP -\fBuses [\-\-installed]\fR \fIformula\fR -Show the formulas that specify \fIformula\fR as a dependency\. The list is not recursive; only one level of dependencies is resolved\. +\fBuses [\-\-installed] [\-\-recursive]\fR \fIformula\fR +Show the formulas that specify \fIformula\fR as a dependency\. +. +.IP +Use \fB\-\-recursive\fR to resolve more than one level of dependencies\. . .IP If \fB\-\-installed\fR is passed, only list installed formulae\. -- GitLab