[zsh] Move func/ directory to zsh/functions
This commit is contained in:
parent
91da2fc583
commit
7c08c5131f
53 changed files with 1 additions and 1 deletions
19
zsh/functions/homebrew-prefix
Normal file
19
zsh/functions/homebrew-prefix
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
#!/usr/bin/env zsh
|
||||
|
||||
autoload binary_exists
|
||||
|
||||
function homebrew-prefix
|
||||
{
|
||||
if [[ -e "$SYSTEM_PARAMETERS_FILE" ]] && binary_exists jq; then
|
||||
jq .parameters.homebrew_prefix.value "$SYSTEM_PARAMETERS_FILE"
|
||||
return
|
||||
fi
|
||||
|
||||
if ! binary_exists brew; then
|
||||
return
|
||||
fi
|
||||
|
||||
brew --prefix
|
||||
}
|
||||
|
||||
homebrew-prefix "$@"
|
||||
Loading…
Add table
Add a link
Reference in a new issue