Skip to content

Commit

Permalink
Cleaned up global assignment
Browse files Browse the repository at this point in the history
  • Loading branch information
james-pre committed Oct 13, 2024
1 parent 5445f6d commit b4e6e56
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/shell.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ function exec(line: string): void {
const shell = createShell({
terminal,
get prompt(): string {
console.log(path.cwd);
return `[${chalk.green(path.cwd == '/root' ? '~' : path.basename(path.cwd) || '/')}]$ `;
},
/**
Expand All @@ -78,5 +77,5 @@ const shell = createShell({
}
},
});
(globalThis as typeof globalThis & { shell: typeof shell }).shell = shell;
Object.assign(globalThis, { shell });
terminal.write(shell.prompt);

0 comments on commit b4e6e56

Please sign in to comment.