summary refs log tree commit diff stats
path: root/lib
diff options
context:
space:
mode:
authorMichał Zieliński <michal@zielinscy.org.pl>2013-12-10 23:00:01 +0100
committerMichał Zieliński <michal@zielinscy.org.pl>2013-12-10 23:00:01 +0100
commitc36319727558f92a47f7aa5fed1d696d63b48d65 (patch)
tree205da315eeb57c2f3683c105398581660caf3418 /lib
parentb8072bd22ec6e3ccf1a6be1b19fae9de3a0fdcc9 (diff)
downloadNim-c36319727558f92a47f7aa5fed1d696d63b48d65.tar.gz
Deprecate quoteIfContainsWhite in favor of osproc.quoteShell.
Diffstat (limited to 'lib')
-rw-r--r--lib/pure/strutils.nim4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/pure/strutils.nim b/lib/pure/strutils.nim
index a4aa81578..fe71cb77b 100644
--- a/lib/pure/strutils.nim
+++ b/lib/pure/strutils.nim
@@ -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: