aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDeposite Pirate2025-04-03 10:51:13 +0200
committerDeposite Pirate2025-04-03 10:51:13 +0200
commit5df597e529714bf108ef97326ef17ed165f83f1f (patch)
treed8614f2c1232adbe40675a332bda2c3c7b01c533
parent1f0f7156f089c13ccabaed86f0686ae44ec90d9d (diff)
is-installed function for brew/macos
modified: conf.d/02platform.fish
-rw-r--r--conf.d/02platform.fish4
1 files changed, 4 insertions, 0 deletions
diff --git a/conf.d/02platform.fish b/conf.d/02platform.fish
index 1cd3561..56d8069 100644
--- a/conf.d/02platform.fish
+++ b/conf.d/02platform.fish
@@ -138,6 +138,10 @@ if status is-interactive
alias pkgadd 'brew install'
alias pkgrm 'brew uninstall'
alias pkgupd 'brew update ; echo ; brew upgrade'
+
+ function is-installed
+ brew list -1 | grep -q "^$argv\$"
+ end
end
# If we have MacPorts