Deprecate quoteIfContainsWhite in favor of osproc.quoteShell.
This commit is contained in:
parent
b8072bd22e
commit
c363197275
1 changed files with 3 additions and 1 deletions
|
|
@ -709,9 +709,11 @@ proc rfind*(s, sub: string, start: int = -1): int {.noSideEffect.} =
|
|||
if result != -1: return
|
||||
return -1
|
||||
|
||||
proc quoteIfContainsWhite*(s: string): string =
|
||||
proc quoteIfContainsWhite*(s: string): string {.deprecated.} =
|
||||
## returns ``'"' & s & '"'`` if `s` contains a space and does not
|
||||
## start with a quote, else returns `s`
|
||||
## DEPRECATED as it was confused for shell quoting function.
|
||||
## For this application use osproc.quoteShell.
|
||||
if find(s, {' ', '\t'}) >= 0 and s[0] != '"':
|
||||
result = '"' & s & '"'
|
||||
else:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue