Commit 5097fd4f authored by Ian Hickson's avatar Ian Hickson Committed by GitHub

Prettier help in tool (#6637)

parent ae49356a
...@@ -549,7 +549,7 @@ class HotRunner extends ResidentRunner { ...@@ -549,7 +549,7 @@ class HotRunner extends ResidentRunner {
@override @override
void printHelp({ @required bool details }) { void printHelp({ @required bool details }) {
printStatus('To hot reload your app on the fly, press "r" or F5. To restart the app entirely, press "R".', emphasis: true); printStatus('🔥 To hot reload your app on the fly, press "r" or F5. To restart the app entirely, press "R".', emphasis: true);
printStatus('The Observatory debugger and profiler is available at: http://127.0.0.1:$_observatoryPort/'); printStatus('The Observatory debugger and profiler is available at: http://127.0.0.1:$_observatoryPort/');
if (details) { if (details) {
printStatus('To dump the widget hierarchy of the app (debugDumpApp), press "w".'); printStatus('To dump the widget hierarchy of the app (debugDumpApp), press "w".');
......
...@@ -176,9 +176,10 @@ abstract class ResidentRunner { ...@@ -176,9 +176,10 @@ abstract class ResidentRunner {
void setupTerminal() { void setupTerminal() {
if (usesTerminalUI) { if (usesTerminalUI) {
if (!logger.quiet) if (!logger.quiet) {
printStatus('');
printHelp(details: false); printHelp(details: false);
}
terminal.singleCharMode = true; terminal.singleCharMode = true;
terminal.onCharInput.listen((String code) { terminal.onCharInput.listen((String code) {
processTerminalInput(code); processTerminalInput(code);
......
...@@ -262,20 +262,22 @@ class RunAndStayResident extends ResidentRunner { ...@@ -262,20 +262,22 @@ class RunAndStayResident extends ResidentRunner {
@override @override
void printHelp({ @required bool details }) { void printHelp({ @required bool details }) {
final bool showRestartText = !prebuiltMode && device.supportsRestart && bool haveDetails = false;
supportsServiceProtocol; if (!prebuiltMode && device.supportsRestart && supportsServiceProtocol)
if (showRestartText)
printStatus('To restart the app, press "r" or F5.'); printStatus('To restart the app, press "r" or F5.');
if (_result.hasObservatory) if (_result.hasObservatory)
printStatus('The Observatory debugger and profiler is available at: http://127.0.0.1:${_result.observatoryPort}/'); printStatus('The Observatory debugger and profiler is available at: http://127.0.0.1:${_result.observatoryPort}/');
if (details) { if (supportsServiceProtocol) {
if (supportsServiceProtocol) { haveDetails = true;
if (details) {
printStatus('To dump the widget hierarchy of the app (debugDumpApp), press "w".'); printStatus('To dump the widget hierarchy of the app (debugDumpApp), press "w".');
printStatus('To dump the rendering tree of the app (debugDumpRenderTree), press "r".'); printStatus('To dump the rendering tree of the app (debugDumpRenderTree), press "r".');
} }
printStatus('To repeat this help message, press "h" or F1. To quit, press "q", F10, or Ctrl-C.'); }
} else { if (haveDetails && !details) {
printStatus('For a more detailed help message, press "h" or F1. To quit, press "q", F10, or Ctrl-C.'); printStatus('For a more detailed help message, press "h" or F1. To quit, press "q", F10, or Ctrl-C.');
} else {
printStatus('To repeat this help message, press "h" or F1. To quit, press "q", F10, or Ctrl-C.');
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment