Skip to content

Commit

Permalink
sys/console: Don't show prompt when echo is off
Browse files Browse the repository at this point in the history
Prompt is output on console that did not originated in application code.
This is similar to echo characters that goes out of console outside
of application decision.

This disable printing prompt when echo is turned off so console
code does not add anything to the output.
  • Loading branch information
kasjer committed Mar 16, 2020
1 parent a4d5763 commit 1a0809d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions sys/console/full/src/console.c
Original file line number Diff line number Diff line change
Expand Up @@ -471,6 +471,10 @@ console_prompt_set(const char *prompt, const char *line)
}
trailing_chars = 0;

if (!console_is_interactive) {
return;
}

locked = console_lock(1000) == OS_OK;

console_switch_to_prompt();
Expand Down

0 comments on commit 1a0809d

Please sign in to comment.