diff --git a/completions/bash/brew b/completions/bash/brew index 5c2a3855c0..ccb7b354df 100644 --- a/completions/bash/brew +++ b/completions/bash/brew @@ -840,6 +840,7 @@ _brew_edit() { --debug --formula --help + --print-path --quiet --verbose " diff --git a/completions/fish/brew.fish b/completions/fish/brew.fish index e197cfdbd0..77e3347a3c 100644 --- a/completions/fish/brew.fish +++ b/completions/fish/brew.fish @@ -634,6 +634,7 @@ __fish_brew_complete_arg 'edit' -l cask -d 'Treat all named arguments as casks' __fish_brew_complete_arg 'edit' -l debug -d 'Display any debugging information' __fish_brew_complete_arg 'edit' -l formula -d 'Treat all named arguments as formulae' __fish_brew_complete_arg 'edit' -l help -d 'Show this message' +__fish_brew_complete_arg 'edit' -l print-path -d 'Print the file path to be edited, without opening an editor' __fish_brew_complete_arg 'edit' -l quiet -d 'Make some output more quiet' __fish_brew_complete_arg 'edit' -l verbose -d 'Make some output more verbose' __fish_brew_complete_arg 'edit; and not __fish_seen_argument -l cask -l casks' -a '(__fish_brew_suggest_formulae_all)' diff --git a/completions/zsh/_brew b/completions/zsh/_brew index 66aa3106d0..076e87ecd6 100644 --- a/completions/zsh/_brew +++ b/completions/zsh/_brew @@ -776,6 +776,7 @@ _brew_edit() { _arguments \ '--debug[Display any debugging information]' \ '--help[Show this message]' \ + '--print-path[Print the file path to be edited, without opening an editor]' \ '--quiet[Make some output more quiet]' \ '--verbose[Make some output more verbose]' \ - formula \ diff --git a/docs/Manpage.md b/docs/Manpage.md index b0dc2a673b..b0a6168f88 100644 --- a/docs/Manpage.md +++ b/docs/Manpage.md @@ -1110,7 +1110,7 @@ Build bottles for these formulae with GitHub Actions. * `--linux-wheezy`: Use Debian Wheezy container for building the bottle on Linux. -### `edit` [*`--formula`*] [*`--cask`*] [*`formula`*|*`cask`* ...] +### `edit` [*`options`*] [*`formula`*|*`cask`* ...] Open a *`formula`* or *`cask`* in the editor set by `EDITOR` or `HOMEBREW_EDITOR`, or open the Homebrew repository for editing if no formula is provided. @@ -1119,6 +1119,8 @@ or open the Homebrew repository for editing if no formula is provided. Treat all named arguments as formulae. * `--cask`: Treat all named arguments as casks. +* `--print-path`: + Print the file path to be edited, without opening an editor. ### `extract` [*`--version`*`=`] [*`--force`*] *`formula`* *`tap`* diff --git a/manpages/brew.1 b/manpages/brew.1 index dd01832112..fffb7e0a18 100644 --- a/manpages/brew.1 +++ b/manpages/brew.1 @@ -1590,7 +1590,7 @@ Dispatch bottle for Linux (using self\-hosted runner)\. \fB\-\-linux\-wheezy\fR Use Debian Wheezy container for building the bottle on Linux\. . -.SS "\fBedit\fR [\fI\-\-formula\fR] [\fI\-\-cask\fR] [\fIformula\fR|\fIcask\fR \.\.\.]" +.SS "\fBedit\fR [\fIoptions\fR] [\fIformula\fR|\fIcask\fR \.\.\.]" Open a \fIformula\fR or \fIcask\fR in the editor set by \fBEDITOR\fR or \fBHOMEBREW_EDITOR\fR, or open the Homebrew repository for editing if no formula is provided\. . .TP @@ -1601,6 +1601,10 @@ Treat all named arguments as formulae\. \fB\-\-cask\fR Treat all named arguments as casks\. . +.TP +\fB\-\-print\-path\fR +Print the file path to be edited, without opening an editor\. +. .SS "\fBextract\fR [\fI\-\-version\fR\fB=\fR] [\fI\-\-force\fR] \fIformula\fR \fItap\fR" Look through repository history to find the most recent version of \fIformula\fR and create a copy in \fItap\fR\. Specifically, the command will create the new formula file at \fItap\fR\fB/Formula/\fR\fIformula\fR\fB@\fR\fIversion\fR\fB\.rb\fR\. If the tap is not installed yet, attempt to install/clone the tap before continuing\. To extract a formula from a tap that is not \fBhomebrew/core\fR use its fully\-qualified form of \fIuser\fR\fB/\fR\fIrepo\fR\fB/\fR\fIformula\fR\. .