webinstall / webi-installers

Primary and community-submitted packages for webinstall.dev
https://webinstall.dev
Mozilla Public License 2.0
1.97k stars 211 forks source link

Enhancement: split on commas, as well as spaces #286

Closed coolaj86 closed 2 years ago

coolaj86 commented 3 years ago

Ideally, this should work:

webi node,go,rg,sd,fd hugo,hexyl

This is not sufficient:

diff --git a/_webi/bootstrap.sh b/_webi/bootstrap.sh
index 0525608..790c834 100644
--- a/_webi/bootstrap.sh
+++ b/_webi/bootstrap.sh
@@ -141,10 +141,15 @@ function __webi_main () {

     }

+    my_ifs="\${IFS}"
+    IFS=",\${IFS}"
     for pkgname in "\$@"
     do
+        IFS="\${my_ifs}"
         webinstall "\$pkgname"
+        IFS=",\${IFS}"
     done
+    IFS="\${my_ifs}"

     show_path_updates
coolaj86 commented 2 years ago

Too confusing / not intuitive.

Not doing it.

Open to suggestions for the future.