diff --git a/tools/tide_install.fish b/tools/tide_install.fish index 5c74edf..7baa0d6 100644 --- a/tools/tide_install.fish +++ b/tools/tide_install.fish @@ -1,12 +1,20 @@ function tide_install - # If git isn't installed, there's nothing we can do if not command -q git - printf '%s\n' 'Git must be installed to download Tide.' + printf '%s\n' 'Git must be available to install Tide.' return 1 end - argparse --ignore-unknown 'l/local' -- $argv + set -l options l/local u/unattended + argparse $options -- $argv + # Pass through options to _tide_actual_install + for option in $options + set -l longFormOption (string split '/' $option)[2] + if set -q _flag_$longFormOption + set -a flags "--$longFormOption" + end + end + set -l location $argv[-1] if test -z "$location" set location 'main' @@ -14,8 +22,6 @@ function tide_install if set -q _flag_local source "$location/tools/_tide_actual_install.fish" - - set -a flags '-l' else curl --silent "https://raw.githubusercontent.com/IlanCosman/tide/$location/tools/_tide_actual_install.fish" | source end