Skip to content

Commit 02d34dc

Browse files
committed
Updated documentation
1 parent cedc154 commit 02d34dc

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,11 @@
1515
scroll the actual error message off the screen.
1616
* Exceptions occurring in tab completion functions are now printed to stderr before returning control back to
1717
readline. This makes debugging a lot easier since readline suppresses these exceptions.
18+
* Added capability to chain pipe commands and redirect their output (e.g. !ls -l | grep user | wc -l > out.txt)
1819
* Potentially breaking changes
1920
* Replaced `unquote_redirection_tokens()` with `unquote_specific_tokens()`. This was to support the fix
2021
that allows terminators in alias and macro values.
22+
* Changed `Statement.pipe_to` to a string instead of a list
2123
* **Python 3.4 EOL notice**
2224
* Python 3.4 reached its [end of life](https://www.python.org/dev/peps/pep-0429/) on March 18, 2019
2325
* This is the last release of `cmd2` which will support Python 3.4
@@ -87,7 +89,7 @@
8789
sorted the ``CompletionItem`` list. Otherwise it will be sorted using ``self.matches_sort_key``.
8890
* Removed support for bash completion since this feature had slow performance. Also it relied on
8991
``AutoCompleter`` which has since developed a dependency on ``cmd2`` methods.
90-
* Removed ability to call commands in ``pyscript`` as if they were functions (e.g ``app.help()``) in favor
92+
* Removed ability to call commands in ``pyscript`` as if they were functions (e.g. ``app.help()``) in favor
9193
of only supporting one ``pyscript`` interface. This simplifies future maintenance.
9294
* No longer supporting C-style comments. Hash (#) is the only valid comment marker.
9395
* No longer supporting comments embedded in a command. Only command line input where the first

cmd2/cmd2.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2046,8 +2046,8 @@ def _redirect_output(self, statement: Statement) -> Tuple[bool, utils.Redirectio
20462046
start_new_session=start_new_session,
20472047
shell=True)
20482048

2049-
# Popen was called with shell=True so the user can do stuff like redirect the output of the pipe
2050-
# process (ex: !ls | grep foo > out.txt). But this makes it difficult to know if the pipe process
2049+
# Popen was called with shell=True so the user can chain pipe commands and redirect their output
2050+
# like: !ls -l | grep user | wc -l > out.txt. But this makes it difficult to know if the pipe process
20512051
# started OK, since the shell itself always starts. Therefore, we will wait a short time and check
20522052
# if the pipe process is still running.
20532053
try:

0 commit comments

Comments
 (0)