mirror of
https://github.com/xonsh/xonsh.git
synced 2025-03-04 08:24:40 +01:00
commit
4896ecbade
2 changed files with 35 additions and 0 deletions
|
@ -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
13
news/tutorial-quoting.rst
Normal file
|
@ -0,0 +1,13 @@
|
|||
**Added:**
|
||||
|
||||
* Section about quoting in the tutorial.
|
||||
|
||||
**Changed:** None
|
||||
|
||||
**Deprecated:** None
|
||||
|
||||
**Removed:** None
|
||||
|
||||
**Fixed:** None
|
||||
|
||||
**Security:** None
|
Loading…
Add table
Reference in a new issue