{"id":23141604,"url":"https://github.com/zekrotja/whattheshell","last_synced_at":"2025-09-05T06:35:45.493Z","repository":{"id":183247873,"uuid":"669848066","full_name":"zekroTJA/whattheshell","owner":"zekroTJA","description":"The answer to the question \"In what shell am I running?\" - Infer terminal shell","archived":false,"fork":false,"pushed_at":"2024-03-28T16:15:12.000Z","size":13,"stargazers_count":9,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-08-28T01:02:44.421Z","etag":null,"topics":["cli","rust","shell","terminal"],"latest_commit_sha":null,"homepage":"https://docs.rs/whattheshell/latest/whattheshell/index.html","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zekroTJA.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2023-07-23T16:15:07.000Z","updated_at":"2024-03-28T15:48:24.000Z","dependencies_parsed_at":null,"dependency_job_id":"ec97bd7f-ddf8-4a85-bc35-e553e0368c49","html_url":"https://github.com/zekroTJA/whattheshell","commit_stats":null,"previous_names":["zekrotja/whattheshell"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/zekroTJA/whattheshell","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zekroTJA%2Fwhattheshell","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zekroTJA%2Fwhattheshell/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zekroTJA%2Fwhattheshell/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zekroTJA%2Fwhattheshell/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zekroTJA","download_url":"https://codeload.github.com/zekroTJA/whattheshell/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zekroTJA%2Fwhattheshell/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273723144,"owners_count":25156302,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-05T02:00:09.113Z","response_time":402,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","rust","shell","terminal"],"created_at":"2024-12-17T14:14:01.395Z","updated_at":"2025-09-05T06:35:45.469Z","avatar_url":"https://github.com/zekroTJA.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# whattheshell\n\nThis crate tries to provide a simple solution for a simple problem: \"In what shell am I running?\"\n\nWith `Shell::infer()`, the currently used shell is tried to be inferred by inspecting the given environment.\n\nOn unix-systems, the output of `ps -o ppid,comm {pid}` is inspected to get the process' parent process which is followed down the tree until a shell process was found. On non-unix system, the same algorithm is used but by the help of the crate [`sysinfo`](https://crates.io/crates/sysinfo).\n\n## Example\n\n```rust\nuse whattheshell::Shell;\n\nfn main() {\n    let shell = Shell::infer().unwrap();\n    println!(\"{shell}\"); // -\u003e \"zsh\"\n}\n```\n\n## Supported shells\n\nHere you can find a list of currently supported shells.\n\n- Shell (`sh`)\n- Bash (`bash`)\n- Z shell (`zsh`)\n- Fish (`fish`)\n- Nushell (`nu`)\n- PowerShell (`powershell`, `pwsh`)\n- Cmd (`cmd`)\n\nAre you missing a shell? Feel free to [create an issue](https://github.com/zekroTJA/whattheshell/issues/new) or create a pull request with an implementation.\n\n## Credits\n\nThis implementation is very much inspired and influenced by the shell infer implementation in [Schniz/fnm](https://github.com/Schniz/fnm) (see [fnm/src/shell](https://github.com/Schniz/fnm/tree/master/src/shell)).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzekrotja%2Fwhattheshell","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzekrotja%2Fwhattheshell","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzekrotja%2Fwhattheshell/lists"}