Update tutorial.rst: fix decorator alias mention

This commit is contained in:
Andy Kipp 2024-09-16 11:16:23 +02:00 committed by GitHub
parent fabdfc0fdc
commit b437f19fc3
Failed to generate hash of commit

View file

@ -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")