add a prompt string

This commit is contained in:
fuwa
2019-09-25 16:26:45 +08:00
parent 0ff83713de
commit fee66729f4
3 changed files with 4 additions and 1 deletions
+1
View File
@@ -126,4 +126,5 @@ final config = CryptoConfig
'--fast-block-sync=1',
'--block-sync-size=5',
],
'[1337@cyberwow]: ',
);
+2
View File
@@ -30,6 +30,7 @@ class CryptoConfig {
final int port;
final Set<String> commands;
final List<String> extraArgs;
final String promptString;
const CryptoConfig
(
this.outputBin,
@@ -40,5 +41,6 @@ class CryptoConfig {
this.port,
this.commands,
this.extraArgs,
this.promptString,
);
}
+1 -1
View File
@@ -248,7 +248,7 @@ class SyncedState extends HookedState {
}
void appendInput(final String line) {
stdout.addLast('> ' + line + '\n');
stdout.addLast(config.c.promptString + line + '\n');
syncState();
processInput.add(line);