TL;DR The following snippet added to you ~/.zshrc will recognize project folders you changed to, so that when you create new shells (i.e. through opening a terminal) it changes to the last used project automatically. Please find the complete snippet at the end of this post.

Some projects have a lot of processes. While there are tools for orchestrating the startup of applications that require multiple processes, sometimes it just more convenient to open terminals for each of those processes. But having opened multiple terminals, it would be cumbersome to have to change to the project's directory on each of those...

  • tricks
  • linux
  • console
  • cli
  • terminal
  • shell
  • zsh

Back in the days when I was developing in Ruby most of my waking hours rbenv was a real life saver. But looking at what it does, it initially felt awkward how it "wrapped" the cd command. You could argue that the Ruby community are no strangers to guerrilla patching. But it felt less awkward when I learned that in my zsh it uses hooks instead of guerrilla patching to achieve the same goal: React on changing the directory.

In the meantime I tried a couple of things with zsh hooks to optimize work flows and what not, but...

  • tricks
  • linux
  • console
  • cli
  • terminal
  • shell
  • zsh

I'm using the command line extensively, with plenty of black terminals side by side in my tiling window manager I was looking for something that helps distinguish remote shells (via ssh) from my local shells.

Introducing one of my favorite tricks: Changing the background color of the terminal while running an ssh session.

...
  • tricks
  • linux
  • console
  • cli
  • terminal
  • shell
  • ssh
  • dbus
  • roxterm
  • zsh