mirror of
https://github.com/xonsh/xonsh.git
synced 2025-03-04 08:24:40 +01:00
Update tutorial.rst: fix decorator alias mention
This commit is contained in:
parent
fabdfc0fdc
commit
b437f19fc3
1 changed files with 3 additions and 3 deletions
|
@ -543,12 +543,12 @@ For example, the ``echo`` command has no interaction with the user and is captur
|
|||
However, some tools have mixed behavior and can be run for either interactive or non-interactive tasks.
|
||||
The best example of this is ``ssh``, which allows for remote terminal sessions and executing commands.
|
||||
|
||||
To handle different types of tasks, xonsh has the ``xthread`` and ``xunthread`` built-in aliases.
|
||||
If you need to capture the output from an interactive tool that has a capturable mode use ``xthread`` to run:
|
||||
To handle different types of tasks, xonsh has the ``@thread`` and ``@unthread`` built-in decorator aliases.
|
||||
If you need to capture the output from an interactive tool that has a capturable mode use ``@thread`` to run:
|
||||
|
||||
.. code-block:: xonshcon
|
||||
|
||||
@ !(xthread ssh host -T 'echo remote')
|
||||
@ !(@thread ssh host -T 'echo remote')
|
||||
CommandPipeline(output="remote")
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue