add a prompt string

pull/2/head
fuwa 5 years ago
parent 0ff83713de
commit fee66729f4

@ -126,4 +126,5 @@ final config = CryptoConfig
'--fast-block-sync=1', '--fast-block-sync=1',
'--block-sync-size=5', '--block-sync-size=5',
], ],
'[1337@cyberwow]: ',
); );

@ -30,6 +30,7 @@ class CryptoConfig {
final int port; final int port;
final Set<String> commands; final Set<String> commands;
final List<String> extraArgs; final List<String> extraArgs;
final String promptString;
const CryptoConfig const CryptoConfig
( (
this.outputBin, this.outputBin,
@ -40,5 +41,6 @@ class CryptoConfig {
this.port, this.port,
this.commands, this.commands,
this.extraArgs, this.extraArgs,
this.promptString,
); );
} }

@ -248,7 +248,7 @@ class SyncedState extends HookedState {
} }
void appendInput(final String line) { void appendInput(final String line) {
stdout.addLast('> ' + line + '\n'); stdout.addLast(config.c.promptString + line + '\n');
syncState(); syncState();
processInput.add(line); processInput.add(line);