DannyBen/bashly

View on GitHub
lib/bashly/views/command/parse_requirements_while.gtx

Summary

Maintainability
Test Coverage
= view_marker

> while [[ $# -gt 0 ]]; do
>   key="$1"
>   case "$key" in

unless global_flags?
  flags.each do |flag|
    = flag.render(:case).indent(4)
  end
end

>
if catch_all.enabled?
>     --)
>       shift
>       other_args+=("$@")
>       break
>       ;;
>
end

>     -?*)
if catch_all.enabled?
  >       other_args+=("$1")
  >       shift
  >       ;;

else
  >       printf "{{ strings[:invalid_flag] }}\n" "$key" >&2
  >       exit 1
  >       ;;

end

> 
>     *)
= render(:parse_requirements_case).indent(6)
>       ;;
> 
>   esac
> done