What can we do in Zsh?


  • Using Themes

    When you already installed zsh (oh my zsh) you will get file named zshrc on your home directory, you can change the theme by edit this line on zshrc files.

      ...
      ...
      ZSH_THEME="themename"
      ...
      ...
    

  • Color Indicator

    Look at the right arrow icon, when you type correct command and success there will be green and when incorrect will be red.


  • Fast Change Directory

    You would skip the cd command when change directory, look at this pictures.

    How it possible? So, try type $ alias on your terminal and you will see the reason.


  • Shorthand Directory

    if you know the first letter of a word, you can do like this.

    $ ls ~/d/g/d<tab>
    

    When the tab button is pressed, it would print like this.

    $ ls ~/Documents/git-repo/dados-sae
    

    Notes: you can use this feature for other CLI.


  • Easy History

    Try type this on your terminal.

    $ cd<UP>
    

    Press UP button and you can get history of command started with cd.

    $ cd Documents/git-repo/dados-sae/
    

    You can change cd with everything command that you want, Amazing!


  • Tab Completion

    Everything that i have explained to you before partially using Tab Completion, but you can do more like this.

    • When you press tab 2 times, you can move through the listed items.

    • Kill process with tab

    • List all available parameters for command

    • Expand environment variables

      Try to type this.

      $ $HOME<tab>
      

      And you will get your home directory.

    • Fix your type even lowercase or uppercase

      Try to type this.

      $ cd docu<tab>
      

      and you will get $ cd Documents.


  • Using Plugins

    My favourite plugins on zsh is:

    • Auto-Suggestion

      When using this plugin, you will see the next word suggestion with grey color (default). This is come from your past command. Look at this picture.

    • Syntax Highlighting

      With this plugin you will able to see color to your command, even if the command is true or correct it will change the command to green, or red when it false or incorrect. Look at this picture.

    • Git

      If you are not familiar with git, you can check on this website.

      Try type $ alias | grep git on your terminal. And you will see why i love it.

    Thats my favourite plugins, but there are still many other plugins that you can use.


  • Globbing?

    I am not expert using this things, but if you want an example, you can going to this website.


References