FG

Change directory cd to another terminal's cwd

Fresh3 days ago
Mar 15, 20261978 views
Confidence Score0%
0%

Problem

I would like to create a command like (lets call it ) that will change directories to the last changed-to directory from another terminal window similar to the option to open a new terminal in the directory that previous window/tab was in (I don't see that option in Mac OS X terminal). To do so I f…

Error Output

alias cdp='cd  `cat /tmp/CWD`

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: Change directory cd to another terminal's cwd

Low Risk

Aliases don't accept parameters. You'll have to use a function. You should also use the builtin. See this for another approach that's specific to OS X. It's a script that can launch a new Terminal window or tab opening with its current directory the…

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment