Added fixes.

This commit is contained in:
metacollin 2020-11-19 20:18:08 -07:00
parent b04a5ffa0b
commit c176f28f39
3 changed files with 7 additions and 7 deletions

View File

@ -1,11 +1,11 @@
#: * `formulae`
#:
#: * `formulae` [<options>]
#:
#: Prints a sorted list of locally available formulas including shortnames.
#:
# shellcheck disable=SC2155
homebrew-formulae() {
local formulae="$(find "$HOMEBREW_REPOSITORY"/Library/Taps -type d \( -name Casks -o -name cmd -o -name .github \) -prune -false -o -name '*rb' | sed 's/\.rb//g' | sed -E 's .*/Taps/(.*)/homebrew- \1/ g' | sed 's /Formula/ / g')"
local shortnames="$(echo "$formulae" | cut -d / -f 3)"
echo -e "$formulae \n $shortnames" | grep -v '^homebrew/' | sort -uf
local formulae="$(\find "$HOMEBREW_REPOSITORY"/Library/Taps -type d \( -name Casks -o -name cmd -o -name .github \) -prune -false -o -name '*rb' | \sed -E -e 's/\.rb//g' -e 's_.*/Taps/(.*)/(home|linux)brew-_\1/_' -e 's|/Formula/|/|')"
local shortnames="$(echo "$formulae" | \cut -d / -f 3)"
echo -e "$formulae \n $shortnames" | \grep -v '^homebrew/' | \sort -uf
}

View File

@ -111,7 +111,7 @@ __brew_common_commands() {
'edit:edit a formula'
'fetch:download formula resources to the cache'
'formula:the path for a formula'
'formulas:show a sorted list of installable formulas'
'formulae:show a sorted list of installable formulae'
'gist-logs:generate a gist of the full build logs'
'home:visit the homepage of a formula or the brew project'
'info:information about a formula'

View File

@ -242,7 +242,7 @@ For tarballs, also print SHA-256 checksums.
### `formulae`
Prints a sorted list of locally available formulas including shortnames.
List all locally available formulae including short names.
### `gist-logs` [*`options`*] *`formula`*