{"id":16682013,"url":"https://github.com/mossop/shell-args","last_synced_at":"2025-10-18T05:08:27.429Z","repository":{"id":42883190,"uuid":"253585926","full_name":"Mossop/shell-args","owner":"Mossop","description":"Parsing and quoting for shell command lines that supports both bash and windows styles of quoting.","archived":false,"fork":false,"pushed_at":"2023-01-06T22:50:47.000Z","size":1133,"stargazers_count":0,"open_issues_count":4,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-25T08:20:59.847Z","etag":null,"topics":["api","javascript","nodejs","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Mossop.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-04-06T18:42:53.000Z","updated_at":"2022-06-05T10:00:00.000Z","dependencies_parsed_at":"2023-02-06T09:46:56.489Z","dependency_job_id":null,"html_url":"https://github.com/Mossop/shell-args","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mossop%2Fshell-args","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mossop%2Fshell-args/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mossop%2Fshell-args/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mossop%2Fshell-args/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Mossop","download_url":"https://codeload.github.com/Mossop/shell-args/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243392298,"owners_count":20283560,"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":["api","javascript","nodejs","typescript"],"created_at":"2024-10-12T14:05:56.740Z","updated_at":"2025-10-18T05:08:22.383Z","avatar_url":"https://github.com/Mossop.png","language":"TypeScript","readme":"# shell-args\n\nA simple set of functions for parsing a command line string into arguments and converting command\nline arguments into a correctly escaped string.\n\nMany other npm modules offer this functionality however the only ones I could find only support\nunix style escaping and so do not work correctly for windows command lines.\n\nThis module exports `bashShellParse`, `winShellParse`, `bashShellQuote` and `winShellQuote`. It\nalso exports `shellQuote` and `shellParse` which call the function correct for the current platform.\n\nThe parse functions accept a string and return an array of strings:\n```javascript\nimport { bashShellQuote } from \"shell-args\";\n\nbashShellParse(\"hello there world\"); // -\u003e [\"hello\", \"there\", \"world\"]\nbashShellParse(\"\\\"hello there\\\" world\"); // -\u003e [\"hello there\", \"world\"]\nbashShellParse(`foo\ntest\\\\(\\\\)`); // -\u003e [\"foo\", \"test()\"]\n```\n\nThe quote functions accept an array of strings and return a string:\n```javascript\nimport { bashShellParse } from \"shell-args\";\n\nbashShellQuote([\"hello\", \"there\", \"world\"]); // -\u003e \"hello there world\"\nbashShellQuote([\"hello there\", \"world\"]); // -\u003e \"\\\"hello there\\\" world\"\nbashShellQuote([\"foo\", \"test()\"]); // -\u003e [\"foo\", \"test\\\\(\\\\)\"]\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmossop%2Fshell-args","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmossop%2Fshell-args","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmossop%2Fshell-args/lists"}