{"id":18829454,"url":"https://github.com/michaeladler/shell-snoop","last_synced_at":"2025-04-14T03:33:42.255Z","repository":{"id":41286313,"uuid":"368458960","full_name":"michaeladler/shell-snoop","owner":"michaeladler","description":"figure out the exact command which was used to run a child process in a shell","archived":true,"fork":false,"pushed_at":"2024-04-29T05:51:04.000Z","size":66,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-20T02:26:49.053Z","etag":null,"topics":["tmux-plugins"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/michaeladler.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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-05-18T08:38:37.000Z","updated_at":"2024-05-27T06:17:49.000Z","dependencies_parsed_at":"2024-01-23T08:28:23.775Z","dependency_job_id":"508d225f-3d95-4f4e-97c2-ee80740f4c8b","html_url":"https://github.com/michaeladler/shell-snoop","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michaeladler%2Fshell-snoop","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michaeladler%2Fshell-snoop/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michaeladler%2Fshell-snoop/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michaeladler%2Fshell-snoop/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/michaeladler","download_url":"https://codeload.github.com/michaeladler/shell-snoop/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248816007,"owners_count":21166003,"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","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":["tmux-plugins"],"created_at":"2024-11-08T01:44:51.162Z","updated_at":"2025-04-14T03:33:37.246Z","avatar_url":"https://github.com/michaeladler.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![build](https://github.com/michaeladler/shell-snoop/actions/workflows/build.yml/badge.svg)](https://github.com/michaeladler/shell-snoop/actions/workflows/build.yml)\n[![ci](https://github.com/michaeladler/shell-snoop/actions/workflows/ci.yml/badge.svg)](https://github.com/michaeladler/shell-snoop/actions/workflows/ci.yml)\n\n# shell-snoop\n\n**shell-snoop** figures out the **exact command** which was used to run a child process in a shell.\nThis works great in combination with a session persistence plugin such as [tmux-resurrect](https://github.com/tmux-plugins/tmux-resurrect).\n\nCurrently, there is support for **bash** and **zsh**.\n\n## Demo\n\n```bash\n# get pid of zsh\n$ echo $$\n14316\n\n# start some arbitrary child process:\n$ env foo=bar sleep 300\n```\n\nIn another shell:\n\n```bash\n$ shell-snoop 14316\nenv foo=bar sleep 300\n```\n\nAs you can see, `shell-snoop` was able to figure the exact command which was used to start the child process.\n\n## Build \u0026 Install\n\n```\n$ cargo install\n# setcap cap_sys_ptrace+eip ~/.cargo/bin/shell-snoop\n```\n\n**Hint**: A statically linked binary is provided as an artifact in [Github Actions](https://github.com/michaeladler/shell-snoop/actions/workflows/build.yml).\nYou must be logged in to download it though (this is a restriction imposed by Github for 'security reasons').\n\n## Credits\n\nThis is based on [save_command_strategies/gdb.sh](https://github.com/tmux-plugins/tmux-resurrect/blob/8ebda79f6881d84a0cdc144ad5f20395eb0dd846/save_command_strategies/gdb.sh) by Bruno Sutic.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmichaeladler%2Fshell-snoop","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmichaeladler%2Fshell-snoop","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmichaeladler%2Fshell-snoop/lists"}