Commits

Andy Mikhailenko committed 95c056d

Fix #39: Don't issue bash warnings when not using bash

Comments (0)

Files changed (1)

argh/completion.py

         ...
 
 """
+import os
+
 
 COMPLETION_ENABLED = False
 "Dynamically set to `True` on load if argcomplete_ was successfully imported."
     """
     if COMPLETION_ENABLED:
         argcomplete.autocomplete(parser)
-    else:
+    elif 'bash' in os.getenv('SHELL', ''):
         import warnings
         warnings.warn('Bash completion not available. Install argcomplete.')