See https://github.com/dimo414/ProfileGem/blob/1fd07b1/gemFunctions.sh#L31
It would be nice to do something more principled than the current set | sed ... approach to get the current environment. The comm ... | sed ... "diff" behavior could also be replaced, e.g. by sdiff -s, but sdiff truncates long lines which wouldn't be desirable here.
Cross-reference https://stackoverflow.com/a/61512569/113632 for some similar env-extracting logic.
See https://github.com/dimo414/ProfileGem/blob/1fd07b1/gemFunctions.sh#L31
It would be nice to do something more principled than the current
set | sed ...approach to get the current environment. Thecomm ... | sed ..."diff" behavior could also be replaced, e.g. bysdiff -s, butsdifftruncates long lines which wouldn't be desirable here.Cross-reference https://stackoverflow.com/a/61512569/113632 for some similar env-extracting logic.