This is the cl-shellwords Reference Manual, version 0.1, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 15 05:23:13 2024 GMT+0.
The main system appears first, followed by any subsystem dependency.
cl-shellwords
Common Lisp port of Ruby’s shellwords.rb, for escaping and splitting strings to be passed to a shell.
Joram Schrijver <i@joram.io>
MIT
0.1
cl-ppcre
(system).
shellwords.lisp
(file).
Files are sorted by type and then listed depth-first from the systems components trees.
cl-shellwords/shellwords.lisp
cl-shellwords
(system).
escape
(function).
join
(function).
split
(function).
unmatched-quote-error
(condition).
unmatched-quote-error-string
(reader method).
+split-regexp+
(special variable).
Packages are listed by definition order.
cl-shellwords
shellwords
common-lisp
.
escape
(function).
join
(function).
split
(function).
unmatched-quote-error
(condition).
unmatched-quote-error-string
(generic reader).
+split-regexp+
(special variable).
Definitions are sorted by export status, category, package, and then by lexicographic order.
Escape STRING so that it is safe when used as an argument in a shell like
the Bourne shell.
- If STRING is an empty string, a pair of single quotes is returned.
- An LF character is escaped by placing it in single quotes.
- All other special characters are escaped with a backslash.
Examples:
(escape "") ;=> "”"
(escape "It’s an example string") ;=> "It\s\ an\ example\ string"
(escape "NothingWrongHere") ;=> "NothingWrongHere"
(escape "{LF}") ;=> "’{LF}’" ({LF} = #\linefeed)
Join the elements of SEQUENCE together, separated by spaces. The elements
are first passed to ESCAPE for proper escaping.
SEQUENCE should be a list or vector of strings.
Split STRING into a list of words, handling escaping the same way a shell
like the Bourne shell does.
Whitespace normally acts as a word separator, except when preceded by a
backslash or enclosed in single- or double quotes.
Examples:
(split "example string") ;=> ("example" "string")
(split "example\ escaped string") ;=> ("example escaped" "string")
(split "example ’escaped string’") ;=> ("example" "escaped string")
(split "example "escaped string"") ;=> ("example" "escaped string")
If STRING contains non-matching single- or double quotes, an error of type UNMATCHED-QUOTE-ERROR is signaled. STRING can be retrieved from the error object using UNMATCHED-QUOTE-ERROR-STRING.
unmatched-quote-error
)) ¶Jump to: | E F G J M S U |
---|
Jump to: | E F G J M S U |
---|
Jump to: | +
S |
---|
Index Entry | Section | ||
---|---|---|---|
| |||
+ | |||
+split-regexp+ : | Private special variables | ||
| |||
S | |||
Slot, string : | Public conditions | ||
Special Variable, +split-regexp+ : | Private special variables | ||
string : | Public conditions | ||
|
Jump to: | +
S |
---|
Jump to: | C F P S U |
---|
Jump to: | C F P S U |
---|