From 4906ba8598ab4a3890fb62ea9262812f9571b77f Mon Sep 17 00:00:00 2001 From: Andy Kipp Date: Thu, 2 May 2024 18:01:06 +0200 Subject: [PATCH] Update tutorial.rst: remove new line chars (#5382) Update tutorial.rst --- docs/tutorial.rst | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/tutorial.rst b/docs/tutorial.rst index 4243b3b31..5ade2d707 100644 --- a/docs/tutorial.rst +++ b/docs/tutorial.rst @@ -482,7 +482,7 @@ or inject Python values with the ``@()`` operator: .. code-block:: xonshcon >>> $(echo $HOME) - '/home/snail\n' + '/home/snail' Uncaptured Subprocess with ``$[]`` and ``![]`` =============================================== @@ -551,7 +551,7 @@ be used to generate any of the tokens in the subprocess command list. >>> out = $(echo @(x + ' ' + y)) >>> out - 'xonsh party\n' + 'xonsh party' >>> @("ech" + "o") "hey" hey @@ -599,11 +599,11 @@ Consider the following example: >>> # this returns a string representing stdout >>> $(which ls) - 'ls --color=auto\n' + 'ls --color=auto' >>> # this attempts to run the command, but as one argument - >>> # (looks for 'ls --color=auto\n' with spaces and newline) - >>> @($(which ls).strip()) + >>> # (looks for 'ls --color=auto' with spaces) + >>> @($(which ls)) xonsh: subprocess mode: command not found: ls --color=auto >>> # this actually executes the intended command