zsh tips
Shell (zsh)
ZSH provides:
- Auto-correct of misspelled commands.
- Easy drop-in replacement of bash.
- Better
cd
completion using<tab>
. - Path expansion:
cd /u/t/d/d
+<tab>
=cd /user/thalion/dev/demo
.
Configuration framework: Oh My Zsh
Oh My Zsh includes 200+ plugins and 140+ themes. Most important are:
- git: tons of aliases and useful functions for git.
- tmux: alias and settings for integrating zsh with tmux.
- node: adds
node-docs
command for opening website docs. - web-search: initialize web searches from command line.
- auto-suggestions: fast, unobtrusive suggestions as you type based on history.
Session Management (tmux)
It allows you to create session, so you can work on several projects at once.
- Each session can be customized to the exact layout you need.
- You can name sessions for easy switching, and even save and restore sessions if your terminal is closed.
- It has its own customizable status line that will allow you display things like time, date, CPU usage, and more.
- It even has a plugin manager and a whole slew of awesome plugins & features.
Search (ripgrep)
“Use ripgrep if you like speed, filtering by default (ignoring anything that your .gitignore
file ignores, and skips binaries and hidden files), fewer bugs and Unicode support”.
Fuzzy Finding (fzf)
fzf is a general-purpose command-line fuzzy finder. It can also be used with any list: files, command history, processes, hostnames, bookmarks, git commits… There are many examples fzf wiki.
Terminal Prompt (Spaceship)
Spaceship is simple, clean, and provides only relevant information:
- git/mercurial integration.
- battery level indicator.
- clever host name and user data.
- version numbers for a variety of libraries
- icons.
Changing directories (z)
Once installed, z will start learning which directories you visit. Then, you can give it a regex (or simple folder name) to hop to the most likely candidate.
1 | # before |
Bonus
Weather
1 | curl wttr.in |
Star wars
1 | telnet towel.blinkenlights.nl |