1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 09:58:11 +00:00

Shell: Add support for showing number of jobs in prompt with "\j"

This commit is contained in:
Adam Harald Jørgensen 2023-10-24 21:30:32 +02:00 committed by Ali Mohammad Pur
parent f81bc8b045
commit 3d42e68265

View file

@ -129,6 +129,9 @@ DeprecatedString Shell::prompt() const
} else if (lexer.consume_specific('p')) {
builder.append(uid == 0 ? '#' : '$');
} else if (lexer.consume_specific('j')) {
builder.appendff("{}", jobs.size());
} else if (lexer.consume_specific('!')) {
if (m_editor)
builder.appendff("{}", m_editor->history().size() + 1);