shlex

Split string into shell words

Pure Nim score 30/100 · tests present · docs generated

Summary

Latest Version 0.1.0
License MIT
CI Status Failing
Downloads 0
Last Indexed 2026-09-03 07:22

Authors

  • SolitudeSF

Installation

nimble install shlex
choosenim install shlex
git clone https://github.com/SolitudeSF/shlex

OS Compatibility

Platform Linux macOS Windows FreeBSD OpenBSD NetBSD Android iOS WASM Embedded
shlex - - - - - - -

Dependencies

Package Version Optional
nim >= 0.19.4 No

Source

Repository https://github.com/SolitudeSF/shlex
Homepage https://github.com/SolitudeSF/shlex
Documentation View Documentation
Registry Source nimble_official

README

shlex

Split a string into words according to POSIX shell syntax

Library provides a function, that return a sequence of words and a boolean, that shows if the input contained errors, and an iterator that just returns words.

Installation

nimble install shlex

Example

import shlex

doAssert shlex("foo\nbar").words == @["foo", "bar"]

for word in shlex("I love \"Nim👑\""):
  echo word