fish: update homebrew function formatting
This commit is contained in:
parent
a74af1b576
commit
e02d505036
@ -1,8 +1,8 @@
|
||||
function fbrew --description "Fuzzy homebrew"
|
||||
if test (count $argv) -eq 0
|
||||
echo "Usage: fbrew <install|uninstall>"
|
||||
return 1
|
||||
end
|
||||
if test (count $argv) -eq 0
|
||||
echo "Usage: fbrew <install|uninstall>"
|
||||
return 1
|
||||
end
|
||||
|
||||
switch $argv[1]
|
||||
case i install
|
||||
@ -43,7 +43,7 @@ function _fbrew_uninstall
|
||||
# Accumulate uninst_pkgs and their transitive dependencies
|
||||
set --local uninst_pkgs_all $uninst_pkgs
|
||||
for bdi in $brew_deps_installed
|
||||
set --local pkg (string split ':' $bdi | head -n 1)
|
||||
set --local pkg (string split ':' $bdi | head -n 1)
|
||||
set --local deps (string split ' ' (string split ':' $bdi | tail -n +2))
|
||||
if contains -- $pkg $uninst_pkgs
|
||||
for dep in $deps
|
||||
@ -59,7 +59,7 @@ function _fbrew_uninstall
|
||||
# Don't uninstall packages that are still dependencies of other packages
|
||||
set --local uninst_pkgs_final $uninst_pkgs_all
|
||||
for bdi in $brew_deps_installed
|
||||
set --local pkg (string split ':' $bdi | head -n 1)
|
||||
set --local pkg (string split ':' $bdi | head -n 1)
|
||||
set --local deps (string split ' ' (string split ':' $bdi | tail -n +2))
|
||||
if not contains -- $pkg $uninst_pkgs_all
|
||||
for dep in $deps
|
||||
|
Loading…
x
Reference in New Issue
Block a user