{#each displayedLines as { line, text, complete }, i}
{#if line.type === 'command' || line.type === 'prompt'}
user@arch:~$
{/if}
{getLinePrefix(line.type)}{text}
{#if showCursor && i === currentLineIndex && !complete && isTyping}
{/if}
{/each}
{#if showCursor && !isTyping && displayedLines.length > 0}
user@arch:~$
{/if}