sauce icon indicating copy to clipboard operation
sauce copied to clipboard

cascaded autoload defaults

Open DanCardin opened this issue 3 years ago • 0 comments

In particular, if i define some top-level alias push = git push origin master, i would ideally like to not have to sauce to get that, while i may not want project-specific values to autoload.

I think a decent first pass at this might be:

  • lack of autoload is always false
  • parent autoload=true values propagate downward for that level of specificity
  • child lack of an autoload setting means parent autoload=trues get loaded
  • child explicit autoload=false disables autoloading entirely

It is maybe somewhat weird that this means you get different behavior if you explicitly define your local preference (false) vs leaving it unset, which also resolves to false.

It might be better to simply have the autoload value propagate inversely, i.e.

  • the autoload value is taken from the level of specificity for the item being loaded, if specified.
  • if unspecified at that level, the local value (and therefore local/global default if unspecified) is chosen instead.

DanCardin avatar Apr 29 '21 18:04 DanCardin