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