Skip to content

Commit

Permalink
Remove green from prompt
Browse files Browse the repository at this point in the history
  • Loading branch information
james-pre committed Oct 14, 2024
1 parent 19109dc commit 948bf7a
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/shell.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,7 @@ export function exec(__cmdLine: string): void {
const shell = createShell({
terminal,
get prompt(): string {
return `[[email protected] ${chalk.green(path.cwd == '/root' ? '~' : path.basename(path.cwd) || '/')}]$ `;
},
get promptLength(): number {
return (path.cwd == '/root' ? '~' : path.basename(path.cwd) || '/').length + 17;
return `[[email protected] ${path.cwd == '/root' ? '~' : path.basename(path.cwd) || '/'}]$ `;
},
/**
* @todo output to history file
Expand All @@ -99,7 +96,7 @@ const shell = createShell({
try {
exec(line);
} catch (error) {
terminal.writeln('Error: ' + (error as Error).message);
terminal.writeln('Error: ' + ((error as Error).message ?? error));
if ($('#terminal input.debug').is(':checked')) {
throw error;
}
Expand Down

0 comments on commit 948bf7a

Please sign in to comment.