Merge pull request #1856 from xonsh/qq

tutorial quoting section
This commit is contained in:
Anthony Scopatz 2016-10-16 15:10:35 -04:00 committed by GitHub
commit 4896ecbade
2 changed files with 35 additions and 0 deletions

View file

@ -314,6 +314,28 @@ force xonsh to do so with the syntax that we will see in the following
sections.
Quoting
=======
Single or double quotes can be used to remove the special meaning
of certain characters or words to xonsh. If a subprocess command
contains characters that collide with xonsh syntax then quotes
must be used to force xonsh to not interpret them.
.. code-block:: xonshcon
>>> echo ${
...
SyntaxError: <xonsh-code>:1:5: ('code: {',)
echo ${
^
>>> echo '${'
${
.. warning:: There is no notion of an escaping character in xonsh like the
backslash (\) in bash.
Captured Subprocess with ``$()`` and ``!()``
============================================
The ``$(<expr>)`` operator in xonsh executes a subprocess command and

13
news/tutorial-quoting.rst Normal file
View file

@ -0,0 +1,13 @@
**Added:**
* Section about quoting in the tutorial.
**Changed:** None
**Deprecated:** None
**Removed:** None
**Fixed:** None
**Security:** None