0

enter image description here

I want to replace the bash-3.2 with the hostname and current working directory. (Like a vs code's integrated terminal)

I am using electron.js with xterm.js and node-pty

Tried below code to spawn node-pty process.

  const ptyProcess = pty.spawn(shell, [], {
    name: 'xterm-color',
    cols: 80,
    rows: 30,
    cwd: process.env.CWD,
    env: process.env,
  });
Thomas Dickey
  • 51,086
  • 7
  • 70
  • 105

0 Answers0