"Kyle J. McKay" <mack...@gmail.com> writes:

> If script2.sh is changed to this:
> # script2.sh fixed
> main() {
>         if [ 5 -gt 3 ]; then
>                 return 5
>         fi
>         case bad in *)
>                 echo always shows
>         esac
>         echo should not get here
>         ! :
> }
> main

Wouldn't it be better to just stop using . within function?

The .-ed script could define the complete function, and then the
function would be used from the toplevel script.

If I understand correctly, your version uses nested functions with file
inclusion between both levels of nesting. That might work for the shells
you tested, but if the goal is to avoid using tricky features that may
trigger bugs on some shells, that seems backward.

IOW, why not move the whole run_specific_rebase_internal function to

Matthieu Moy
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to