Description
Detects the user's current shell from Python code so command-line tools can adjust completions, instructions, or shell-specific behavior. It helps CLIs choose the right integration without asking the user to identify their shell manually.
Developers use it as a small library. Shell detection is best treated as a hint, because unusual terminals, wrappers, or remote sessions can make the result incomplete.