I split my terminal so I have two prompts open (specifically kitty) I resize one of them so one is large where I use my file browser (ranger) and run commands in the smaller one.
My goal is to have the working directory in sync between these two terminals, that is, if I change directory in one of them, the other also changes directory. How can a program like this be written?
You would probably need something to interact with an inter-process call, that sent a message from your active prompt to the passive so passive knows to change its working directory.
Further more, you need to go deep into shell source code and find out how to make a change in working directory.