#726 PR merged: Get and apply bash flags and options settings

Labels: enhancement, cleanup, fixed / solved / done

jsmeix opened issue at 2015-12-02 10:21:

Implemented simple functions get_bash_flags_and_options_commands
and apply_bash_flags_and_options_commands that are used
in a fail-safe way via an explicit variable that
stores the current bash flags and options commands
and using that explicit variable to re-apply them, i.e. like

      saved_flags_options_cmds="$( get_bash_flags_and_options_commands )"
      ... [change bash flags and options] ...
      ... [do something] ...
      apply_bash_flags_and_options_commands "$saved_flags_options_cmds"

Currently those functions are used in framework-functions.sh
when "Entering debugscripts mode" and "Leaving debugscripts mode"
so that the workaround by using DEBUGSCRIPTS_OPPOSITE_ARGUMENT is obsoleted.

See https://github.com/rear/rear/issues/700

gdha commented at 2015-12-02 11:18:

@jsmeix I'm good with your enhancements - perhaps if I need to say something - add a remark in the main script that functions belong the the library scripts, but that these 2 are exceptions on the rule.
And, add yourself to the AUTHORS list, ok?
Gratien


[Export of Github issue for rear/rear.]