From 3fdf7e6ee4a9f203d5976cdd9f385ea7a6b6a907 Mon Sep 17 00:00:00 2001 From: Charles Gould Date: Mon, 3 Aug 2020 23:12:02 -0400 Subject: [PATCH] fish: make homebrew functions write to the commandline --- fish/functions/fbrew.fish | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/fish/functions/fbrew.fish b/fish/functions/fbrew.fish index 9ce47b6..89de2af 100644 --- a/fish/functions/fbrew.fish +++ b/fish/functions/fbrew.fish @@ -9,8 +9,7 @@ function fbrew --description "Fuzzy homebrew" end if test (count $inst_pkgs) -gt 0 - echo "Installing: $inst_pkgs" - brew install $inst_pkgs + commandline -r "brew install $inst_pkgs" end functions --erase _fbrew_install @@ -28,7 +27,7 @@ function fbrew --description "Fuzzy homebrew" end if test (count $uninst_pkgs) -gt 0 - echo "Determining package dependencies..." + echo "Reticulating splines..." # Output is multiline with format "pkgname:" if no dependencies, otherwise "pkgname: dep1 dep2 dep3 ..." set --local brew_deps_installed (string collect (brew deps --installed)) @@ -86,14 +85,13 @@ function fbrew --description "Fuzzy homebrew" end end - if test (count $uninst_pkgs_final) -gt 0 - echo "Uninstalling: $uninst_pkgs_final" - brew uninstall $uninst_pkgs_final - end - if test (count $uninst_pkgs_leave) -gt 0 echo "Will not uninstall: $uninst_pkgs_leave" end + + if test (count $uninst_pkgs_final) -gt 0 + commandline -r "brew uninstall $uninst_pkgs_final" + end end functions --erase _fbrew_uninstall