Jon Aquino's Mental Garden

Engineering beautiful software jon aquino labs | personal blog

Wednesday, June 12, 2013

What I like about zsh

I've been using zsh as my shell for a few weeks now, and I quite like it. Here's why:

  • I can customize the prompt to show the current directory, the current Git branch (and whether it is dirty), and the current time.
  • The history-substring-search plugin lets me type in any substring and press the Up arrow, and it will show me history entries matching that substring (with the match highlighted in purple).
  • History is shared across shell instances. And I can save a year's worth of history to a file.
  • I can replace a substring in the previous command by doing ^foo^bar^:G
  • When I mistype a command or script name, it offers suggestions.
  • When I do !456, it confirms which command that would run.
  • I can do "less **/XG_Media*" to open a file buried in some subdirectory, e.g., src/main/webapp/lib/XG_MediaUploaderHelper.php

I also like running zsh in iTerm2. iTerm2 is cool because:

  • It lets me map Alt+Arrow and Command+Arrow to behave like I want them to.
  • It offers auto-completion using all strings in the window, when I do Command+;
  • It lets me use the Solarized theme.
  • It has a couple of cool features that I don't use much yet:
    • Find text
    • Instant replay

0 Comments:

Post a Comment

<< Home