package shellwords
Install
dune-project
Dependency
Authors
Maintainers
Sources
md5=be880543665890bd93c725910b01409c
sha512=571ad03aef4fdbd88ed05b9c18c92cc33412971f93b51c732f8c83f2bcda3bb116f07715c74403a0366d0258fa0478bc0d502543e71a23454f2722b4aec0d86f
Description
Shellwords is an OCaml implementation of POSIX shell word parsing, intended to match the behavior of the Rust shell-words crate. The library follows the parsing rules of the POSIX.1-2008 Shell Command Language, including quoting, escaping, line continuations, and comments, while delberately excluding shell expansions such as globbing, variable substitution, command substitution, and arithmetic expansion. The API is designed for argv-style processing and provides functionality such as splitting command strings into words and producing shell-safe representations of arguments. Behavioral compatibility with the Rust shell-words crate is a primary goal.
Tags
shell shellwords posix parsing command-line argv quoting splitting stringPublished: 22 Dec 2025
README
shellwords library
The goal of this library is to provide identical behavior to Rust's shell-words crate. That is, in accordance with the parsing rules of Unix shell as specified in Shell Command Language in POSIX.1-2008
Implemented Functions
join:string list -> stringquote:string -> stringsplit:string -> string list