bash_completion: Enable extglob while parsing file
bash_completion: Enable extglob while parsing file

In older versions of GNU Bash extended patterns, such as “@(…)”, are only
available with the “extglob” shell option. As pointed out in [1] and [2],
“extglob” must be enabled while parsing the code. Therefore the flag must be
enabled at the beginning of the script and be reset to its original value at
the end as to not interfere with other code on shell initialization.

[1] http://unix.stackexchange.com/questions/45957
[2] http://mywiki.wooledge.org/glob

Reported by Sascha Lucas.

Signed-off-by: Michael Hanselmann <68b67885ff74281219b4a4be33cc20fd45078d7c@google.com>
Reviewed-by: Bernardo Dal Seno <dcdd79c5479cb9d1329ec01d126f02cb045aa103@google.com>

bitemyapp/ganeti,apyrgio/ganeti,dimara/ganeti,andir/ganeti,andir/ganeti,dimara/ganeti,yiannist/ganeti,mbakke/ganeti,ganeti-github-testing/ganeti-test-1,yiannist/ganeti,onponomarev/ganeti,ganeti/ganeti,mbakke/ganeti,ganeti/ganeti,leshchevds/ganeti,andir/ganeti,bitemyapp/ganeti,apyrgio/snf-ganeti,mbakke/ganeti,apyrgio/ganeti,leshchevds/ganeti,ganeti/ganeti,grnet/snf-ganeti,yiannist/ganeti,ganeti-github-testing/ganeti-test-1,grnet/snf-ganeti,apyrgio/snf-ganeti,leshchevds/ganeti,onponomarev/ganeti