Skip to content

Commit 1efd9df

Browse files
committed
Added info on asynchronous alerting capabilities to the README
1 parent c71fc71 commit 1efd9df

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,16 @@ Instructions for implementing each feature follow.
192192

193193
To create a single-character shortcut for a command, update `Cmd.shortcuts`.
194194

195+
- Asynchronous alerts based on events happening in background threads
196+
- `cmd2` provides the following helper methods for providing information to users asynchronously even though the `cmd2`
197+
REPL is a line-oriented command interpreter:
198+
- `async_alert` - display an important message to the user while they are at the prompt in between commands
199+
- To the user it appears as if an alert message is printed above the prompt
200+
- `async_update_prompt` - update the prompt while the user is still typing at it
201+
- This is good for alerting the user to system changes dynamically in between commands
202+
- `set_window_title` - set the terminal window title
203+
- This changes the window title of the terminal that the user is running the `cmd2` app within
204+
195205

196206
Tutorials
197207
---------

0 commit comments

Comments
 (0)