diff --git a/src/app/desktop/windows/terminal/terminal-states.ts b/src/app/desktop/windows/terminal/terminal-states.ts index 4cd17087..7ec9dacb 100644 --- a/src/app/desktop/windows/terminal/terminal-states.ts +++ b/src/app/desktop/windows/terminal/terminal-states.ts @@ -46,7 +46,11 @@ export abstract class CommandTerminalState implements TerminalState { // Only successful and not-flagged commands will be shown in the protocol. if (!this.commands[command].hideFromProtocol) { - this.protocol.unshift(command); + if (args.length>0) { + this.protocol.unshift(command + ' ' + args.join(' ')); + } else { + this.protocol.unshift(command); + } } } else if (command !== '') { this.commandNotFound(command); diff --git a/src/app/desktop/windows/terminal/terminal.component.spec.ts b/src/app/desktop/windows/terminal/terminal.component.spec.ts index d23dfb59..2a176447 100644 --- a/src/app/desktop/windows/terminal/terminal.component.spec.ts +++ b/src/app/desktop/windows/terminal/terminal.component.spec.ts @@ -35,10 +35,10 @@ describe('TerminalComponent', () => { it('should add commands to the protocol', () => { component.execute('test'); component.execute('help'); - component.execute('help'); + component.execute('help help'); expect(component.getHistory().length).toBe(2); // History is printed in reverse - expect(component.getHistory()).toEqual(['help', 'help']); + expect(component.getHistory()).toEqual(['help help', 'help']); }); it('should clear the protocol with clearHistory', () => {