sarugaku / shellingham

Tool to Detect Surrounding Shell
ISC License
227 stars 33 forks source link

Added quiet option #53

Closed ThatXliner closed 3 years ago

ThatXliner commented 3 years ago

So that it will return None if no shell is found

uranusjr commented 3 years ago

No. IMO this is an anti-pattern. The try-except syntax is there, use it.

ThatXliner commented 3 years ago

It won't allow nice one-liners for fall backs like

shell = shellingham.detect_shell(quiet=True) or os.getenv("SHELL") or os.getenv("COMSPEC")

but ok