feat(brew): add `--prefix` subcommand
Adding the --prefix subcommand
Overview
src/brew.ts:
Info:
Script:
brew services list | sed -e 's/ .*//' | tail -n +2
postProcess(function):
function (out) {
return out
.split("\n")
.filter((line) => !line.includes("unbound"))
.map((line) => ({
name: line,
icon: "fig://icon?type=package",
description: `${action} ${line}`,
}));
}
Script:
brew list -1
postProcess(function):
function (out) {
return out
.split("\n")
.filter((line) => !line.includes("="))
.map((formula) => ({
name: formula,
icon: "🍺",
description: "Installed formula",
}));
}
Script:
brew outdated -q
postProcess(function):
function (out) {
return out.split("\n").map((formula) => ({
name: formula,
icon: "🍺",
description: "Outdated formula",
}));
}
Script:
HBPATH=$(brew --repository); ls -1 $HBPATH/Library/Taps/homebrew/homebrew-core/Formula $HBPATH/Library/Taps/homebrew/homebrew-cask/Casks
postProcess(function):
function (out) {
return out.split("\n").map((formula) => {
return {
name: formula.replace(".rb", ""),
description: "Formula",
icon: "🍺",
priority:
(formula[0] >= "0" && formula[0] <= "9") || formula[0] == "/"
? 0
: 51,
};
});
}
Script:
brew list -1 --cask
postProcess(function):
function (out) {
return out.split("\n").map((formula) => {
return {
name: formula,
icon: "🍺",
description: "Installed formula",
};
});
}
Script:
HBPATH=$(brew --repository); ls -1 $HBPATH/Library/Taps/homebrew/homebrew-core/Formula $HBPATH/Library/Taps/homebrew/homebrew-cask/Casks
postProcess(function):
function (out) {
return out.split("\n").map((formula) => {
return {
name: formula.replace(".rb", ""),
description: "Formula",
icon: "🍺",
priority:
(formula[0] >= "0" && formula[0] <= "9") || formula[0] == "/"
? 0
: 51,
};
});
}
Single Scripts:
-
brew tap -
HBPATH=$(brew --repository); ls -1 $HBPATH/Library/Taps/homebrew/homebrew-core/Formula $HBPATH/Library/Taps/homebrew/homebrew-cask/Casks
Hello @ben5vik, thank you very much for creating a Pull Request! Here is a small checklist to get this PR merged as quickly as possible:
- [ ] Do all subcommands / options which take arguments include the
argsproperty (args: {})? - [ ] Are all options modular? E.g.
-a-u-xinstead of-aux - [ ] Have all other checks passed?
Please add a 👍 as a reaction to this comment to show that you read this.
recheck
CLA Assistant Lite bot:
Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.
I have read the CLA Document and I hereby sign the CLA
You can retrigger this bot by commenting recheck in this Pull Request