()
| 24 | |
| 25 | |
| 26 | def get_default_shell() -> Shells: |
| 27 | shell = os.environ.get('SHELL') |
| 28 | if shell: |
| 29 | shell = shell.split('/')[-1] |
| 30 | if shell in Shells.__members__: |
| 31 | return getattr(Shells, shell) |
| 32 | return Shells.bash |
| 33 | |
| 34 | |
| 35 | @app_completion.command(help="Show completion for the specified shell, to copy or customize it.") |