No description
Find a file
2019-05-07 18:58:44 +03:00
src Initial implementation 2019-05-07 18:58:44 +03:00
tests Initial implementation 2019-05-07 18:58:44 +03:00
LICENSE Initial implementation 2019-05-07 18:58:44 +03:00
README.md Initial implementation 2019-05-07 18:58:44 +03:00
shlex.nimble Initial implementation 2019-05-07 18:58:44 +03:00

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