diff --git a/autotools/build-bash-completion b/autotools/build-bash-completion
index 7bc73df8490501ca5b128a1ebc57d0351726733b..511f521994ea92812e8c1c826b32ad3c8285aeff 100755
--- a/autotools/build-bash-completion
+++ b/autotools/build-bash-completion
@@ -767,11 +767,6 @@ def main():
   sw.Write("gnt_shopt_extglob=$(shopt -p extglob || :)")
   sw.Write("shopt -s extglob")
 
-  # Remember original state of extglob and enable it (required for pattern
-  # matching; must be enabled while parsing script)
-  sw.Write("gnt_shopt_extglob=$(shopt -p extglob || :)")
-  sw.Write("shopt -s extglob")
-
   WritePreamble(sw, not options.compact)
 
   # gnt-* scripts