Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change terminal current working directory in Node.js #89

Open
axetroy opened this issue Mar 25, 2017 · 5 comments
Open

Change terminal current working directory in Node.js #89

axetroy opened this issue Mar 25, 2017 · 5 comments

Comments

@axetroy
Copy link

axetroy commented Mar 25, 2017

I wrote a cli tool to doing something, and I want cd to the other directory when the process exit(not process.chdir, like run cd xx in terminal)

I found a lib robotjs can do it.
but got problme in Windows and this module's size is to large for me.

anyone want to create the module or got some better idea?

@sindresorhus sindresorhus changed the title [Request]change terminal current work directory in nodejs Change terminal current working directory in Node.js Mar 25, 2017
@sindresorhus
Copy link
Owner

Node.js scripts can't directly change the current working directory of the terminal. On macOS, you could use AppleScript or JSX to do it. No idea what the equivalent on Windows is though.

@fregante
Copy link

fregante commented Jan 23, 2020

JSX JXA

(sorry for some reason this issue was the first of the list, didn't realize it was from 2017)

@Richienb
Copy link

Richienb commented Apr 2, 2020

iTerm seems to support setting a CWD. See https://github.com/sindresorhus/ansi-escapes#itermsetcwdpath for an implementation.

@SiddharthShyniben
Copy link

Anything? I wanted the same thing too...

@SiddharthShyniben
Copy link

I found a lib robotjs can do it.

Where @axetroy? I don't see it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants