We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d574f2b commit 56249beCopy full SHA for 56249be
1 file changed
clit/ui.py
@@ -1,8 +1,11 @@
1
"""User interface."""
2
import sys
3
+import time
4
from pathlib import Path
5
from subprocess import PIPE, CalledProcessError
6
7
+import click
8
+
9
from clit.files import shell
10
11
@@ -21,6 +24,9 @@ def notify(title, message):
21
24
)
22
25
23
26
-def prompt(message: str) -> None:
- """Display a prompt with a message."""
- input(f"{message}\nPress ENTER to continue or Ctrl-C to abort")
27
+def prompt(message: str, fg: str = "bright_white") -> None:
28
+ """Display a prompt with a message. Wait a little bit before, so stdout is flushed before the input message."""
29
+ print()
30
+ click.secho(message, fg=fg)
31
+ time.sleep(0.2)
32
+ input("Press ENTER to continue or Ctrl-C to abort: ")
0 commit comments