Shell Detector¶
shell_detector
¶
Shell detection — find the user's login/interactive shell.
Detection order¶
$SHELLenvironment variable (set by login daemons on every modern distro)./proc/<ppid>/exe— resolve the parent process executable./etc/passwdentry for the current user.- Fallback:
/bin/sh.
Results are cached after the first call (lru_cache).
ShellInfo
dataclass
¶
detect
cached
¶
Detect the user's shell and return a :class:ShellInfo.
Results are cached; call detect.cache_clear() in tests.