Skip to content

Commit ea47b3a

Browse files
committed
Fix a few more Markdown files
1 parent 8a4f827 commit ea47b3a

File tree

4 files changed

+264
-254
lines changed

4 files changed

+264
-254
lines changed

docs/features/generating_output.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ While you could send output directly to `sys.stdout`, `cmd2.Cmd`{.interpreted-te
1616
The `cmd2.Cmd.poutput` method is similar to the Python [built-in print function](https://docs.python.org/3/library/functions.html#print). `cmd2.Cmd.poutput` adds two conveniences:
1717

1818
1. Since users can pipe output to a shell command, it catches `BrokenPipeError` and outputs the contents of `self.broken_pipe_warning` to `stderr`. `self.broken_pipe_warning` defaults to an empty string so this method will just swallow the exception. If you want to show an error message, put it in `self.broken_pipe_warning` when you initialize `cmd2.Cmd`.
19-
2. It examines and honors the [allow_style](./settings.md#allowstylestyle) setting. See [Colored Output](#colored-output) below for more details.
19+
2. It examines and honors the [allow_style](./settings.md#allow_style) setting. See [Colored Output](#colored-output) below for more details.
2020

2121
Here's a simple command that shows this method in action:
2222

@@ -38,7 +38,7 @@ When an error occurs in your program, you can display it on `sys.stderr` by call
3838

3939
You may have the need to display information to the user which is not intended to be part of the generated output. This could be debugging information or status information about the progress of long running commands. It's not output, it's not error messages, it's feedback. If you use the [Timing](./settings.md#timing) setting, the output of how long it took the command to run will be output as feedback. You can use the `cmd2.Cmd.pfeedback` method to produce this type of output, and several [Settings](./settings.md) control how it is handled.
4040

41-
If the [quiet](./settings.md#quiet) setting is `True`, then calling `cmd2.Cmd.pfeedback` produces no output. If [quiet](./settings.md#quiet) is `False`, the [feedback_to_output](./settings.md#feedbackto_outputto_output) setting is consulted to determine whether to send the output to `stdout` or `stderr`.
41+
If the [quiet](./settings.md#quiet) setting is `True`, then calling `cmd2.Cmd.pfeedback` produces no output. If [quiet](./settings.md#quiet) is `False`, the [feedback_to_output](./settings.md#feedback_to_output) setting is consulted to determine whether to send the output to `stdout` or `stderr`.
4242

4343
## Exceptions
4444

@@ -56,22 +56,22 @@ You can add your own [ANSI escape sequences](https://en.wikipedia.org/wiki/ANSI_
5656

5757
After adding the desired escape sequences to your output, you should use one of these methods to present the output to the user:
5858

59-
- `cmd2.Cmd.poutput`
60-
- `cmd2.Cmd.perror`
61-
- `cmd2.Cmd.pwarning`
62-
- `cmd2.Cmd.pexcept`
63-
- `cmd2.Cmd.pfeedback`
64-
- `cmd2.Cmd.ppaged`
59+
- `cmd2.Cmd.poutput`
60+
- `cmd2.Cmd.perror`
61+
- `cmd2.Cmd.pwarning`
62+
- `cmd2.Cmd.pexcept`
63+
- `cmd2.Cmd.pfeedback`
64+
- `cmd2.Cmd.ppaged`
6565

66-
These methods all honor the [allow_style](./settings.md#allowstylestyle) setting, which users can modify to control whether these escape codes are passed through to the terminal or not.
66+
These methods all honor the [allow_style](./settings.md#allow_style) setting, which users can modify to control whether these escape codes are passed through to the terminal or not.
6767

6868
## Aligning Text
6969

7070
If you would like to generate output which is left, center, or right aligned within a specified width or the terminal width, the following functions can help:
7171

72-
- `cmd2.utils.align_left`
73-
- `cmd2.utils.align_center`
74-
- `cmd2.utils.align_right`
72+
- `cmd2.utils.align_left`
73+
- `cmd2.utils.align_center`
74+
- `cmd2.utils.align_right`
7575

7676
These functions differ from Python's string justifying functions in that they support characters with display widths greater than 1. Additionally, ANSI style sequences are safely ignored and do not count toward the display width. This means colored text is supported. If text has line breaks, then each line is aligned independently.
7777

0 commit comments

Comments
 (0)