On our server, we have several duplicate-ish folder structures for testing, staging, and production. Other than minor changes, the folder structure between all three are generally the same.
When I'm working on a WordPress plugin, I'm deep within the development folder structure (ex
~/dev/com/wp-content/plugins/myplugin). I know that
If my current working directory is
~/dev/com/wp-content/plugins/myplugin, can I somehow easily switch to
~/staging/com/wp-content/plugins/myplugin without typing the entire directory structure?
I'd like to type something like
~/staging, or even
../../../../../staging and have the command try to traverse down the new directory using my current directory path. Obviously, if the new folder doesn't contain the proper structure, it would error out.
Am I stuck typing the entire directory structure? Or is there a better way?