node-pty icon indicating copy to clipboard operation
node-pty copied to clipboard

add optional support to replace argv[0] (fixes #472)

Open mattieb opened this issue 2 years ago • 3 comments
trafficstars

Fixes #472.

With this, specifying the new property "argv0" in options will replace argv[0] with a custom string.

This is useful, for example, when starting a login shell:

const pty = spawn('/bin/zsh', [], {
  argv0: '-zsh'
});

If this property is omitted, the file parameter is used instead, which is identical to existing behavior.

mattieb avatar Aug 31 '23 23:08 mattieb

@microsoft-github-policy-service agree

mattieb avatar Aug 31 '23 23:08 mattieb

Hey y’all, let me know if anything’s missing, but I’ve been using this for quite some time now day-to-day and haven’t seen any issues.

mattieb avatar Oct 22 '23 12:10 mattieb