{"version":"2.1.246","anchor":"shell-snapshot-records-shell-options-before-functions","canonical_anchor":"shell-snapshot-records-shell-options-before-functions","heading":"Shell snapshot records shell options before functions","tier":"notice","area":"Bash","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.246\/e\/shell-snapshot-records-shell-options-before-functions","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.246","markdown":"### Shell snapshot records shell options before functions\n\nShell snapshots now restore functions that use extglob or globstar syntax correctly.\n\n**What**\n\nThe bash snapshot now writes a shopt section, produced by `shopt -p`, ahead of the function dump. A function body using extglob or globstar syntax only re-parses correctly if the option is already switched on, so functions relying on those previously failed to restore. A duplicated shell-options echo was removed.\n\n**Evidence**\n\n`# shopt before functions: a body using extglob\/globstar syntax only`\n\n- Area: Bash\n- Tier: You'll notice\n- Useful: 3\/5\n- Signal: 1\/5"}