2

I am looking for a command that, when called in terminal, will cd to the directory that is open in the most current nautilus widows.

On Mac, I use cdf provided with zprezto/oh-my-zsh that wraps OSX commands. It makes moving between Finder and terminal so easy and natural.

Ron
  • 20,638
Skarab
  • 243
  • Are you looking for this? – terdon May 05 '15 at 09:57
  • No, I do not want to right click, I want to write cdn in my terminal to open a directory that is opened in nautilus. – Skarab May 05 '15 at 10:09
  • Yes, but I doubt that is possible. You would have to export the directory nautilus is looking at as an environmental variable. Finder is much more integrated into OSX than nautilus is in Unity so I'm not sure that would be possible without hacking nautilus's code. Won't this do as a workaround? – terdon May 05 '15 at 10:18
  • The only problem I see is finding last window. Script can open context menu and call a custom action from it, I think. – Velkan May 05 '15 at 10:23
  • If I understood correctly you want to use cdf command to switch current directory in terminal to the one used in last nautilus window? It is to be used as a single command and not in syntax? – VRR Aug 01 '15 at 06:42
  • Yes. I am looking for a single command. – Skarab Aug 04 '15 at 12:30

0 Answers0