fish: remove useless calls to 'string collect'

This commit is contained in:
Charles Gould 2022-04-17 21:26:07 -04:00
parent 327acf1e27
commit 68da070adb
3 changed files with 5 additions and 5 deletions

View File

@ -31,7 +31,7 @@ function fbrew --description "Fuzzy homebrew"
echo "Reticulating splines..." echo "Reticulating splines..."
# Output is multiline with format "pkgname:" if no dependencies, otherwise "pkgname: dep1 dep2 dep3 ..." # Output is multiline with format "pkgname:" if no dependencies, otherwise "pkgname: dep1 dep2 dep3 ..."
set --local brew_deps_installed (string collect (brew deps --installed)) set --local brew_deps_installed (brew deps --installed)
# Accumulate packages and their dependencies # Accumulate packages and their dependencies
set --local uninst_pkgs_all $uninst_pkgs set --local uninst_pkgs_all $uninst_pkgs

View File

@ -8,8 +8,8 @@ function fish_colors_check --description 'Validate the fish color variables' --a
return 2 return 2
end end
set --local allcolors (string collect (rg --no-line-number --no-filename --only-matching 'fish(?:_pager)?_color[a-z_]*[a-z]+' $fish_srcdir | sort | uniq)) set --local allcolors (rg --no-line-number --no-filename --only-matching 'fish(?:_pager)?_color[a-z_]*[a-z]+' $fish_srcdir | sort | uniq)
set --local setcolors (string collect (set --names | string match 'fish*_color*')) set --local setcolors (set --names | string match 'fish*_color*')
set --local missingcolors set --local missingcolors
set --local unknowncolors set --local unknowncolors

View File

@ -3,7 +3,7 @@
# TODO: how to handle other taps (especially an issue for casks) # TODO: how to handle other taps (especially an issue for casks)
function _install_extra_brews --argument-names favorite_brews function _install_extra_brews --argument-names favorite_brews
set --local brew_pkgs_installed (string collect (brew list)) set --local brew_pkgs_installed (brew list --formula -1)
set --local brew_pkgs_options set --local brew_pkgs_options
for brew_pkg in (cat $favorite_brews) for brew_pkg in (cat $favorite_brews)
if not contains -- $brew_pkg $brew_pkgs_installed if not contains -- $brew_pkg $brew_pkgs_installed
@ -18,7 +18,7 @@ function _install_extra_brews --argument-names favorite_brews
end end
function _install_extra_casks --argument-names favorite_casks function _install_extra_casks --argument-names favorite_casks
set --local brew_casks_installed (string collect (brew list --cask)) set --local brew_casks_installed (brew list --cask -1)
set --local brew_casks_options set --local brew_casks_options
for brew_cask in (cat $favorite_casks) for brew_cask in (cat $favorite_casks)
if not contains -- $brew_cask $brew_casks_installed if not contains -- $brew_cask $brew_casks_installed