<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>Plugins on Mike&#39;s Blog</title>
        <link>https://mikerossiter.tech/tags/plugins/</link>
        <description>Recent content in Plugins on Mike&#39;s Blog</description>
        <generator>Hugo -- gohugo.io</generator>
        <language>en-gb</language>
        <lastBuildDate>Thu, 03 Apr 2025 13:04:14 +0100</lastBuildDate><atom:link href="https://mikerossiter.tech/tags/plugins/index.xml" rel="self" type="application/rss+xml" /><item>
        <title>Bored of Bash? Try Zsh</title>
        <link>https://mikerossiter.tech/posts/bored-of-bash-try-zsh/</link>
        <pubDate>Thu, 29 Sep 2022 08:29:13 +0100</pubDate>
        
        <guid>https://mikerossiter.tech/posts/bored-of-bash-try-zsh/</guid>
        <description>&lt;img src="https://mikerossiter.tech/zsh-header.jpg" alt="Featured image of post Bored of Bash? Try Zsh" /&gt;&lt;h1 id=&#34;bored-of-bash-try-zsh&#34;&gt;Bored of BASH? Try ZSH!
&lt;/h1&gt;&lt;p&gt;For years and years I used the standard Bash (Bourne Again shell) terminal and I still do as it is mostly the default shell but these days I tend to veer towards Zsh (Zee shell! or Zed shell if you&amp;rsquo;re me) for its sheer ease of customisation in the shape of various installable plugins. I was introduced to this by an awesome colleague of mine way back in 2021 and I haven&amp;rsquo;t looked back since. This is how I customise and use Zsh but there are hundreds of other ways to do the same thing. I hope this piques some interest for a few intermediate terminal users looking to nerdify their Linux environment.&lt;/p&gt;
&lt;h2 id=&#34;change-your-default-shell-to-zsh-or-any-other-shell-for-that-matter&#34;&gt;Change your default shell to Zsh (or any other shell for that matter)
&lt;/h2&gt;&lt;p&gt;This depends on your distribution of choice. You might want to leave this step til the end in case you decide you hate Zsh and never want to use it again. If you want to try out other shells available to you by your distribution (Ubuntu, Fedora, Debian, etc) then all you need to do is type:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-fallback&#34; data-lang=&#34;fallback&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;cat /etc/shells
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;into your terminal. If you type the name of the particular shell that you want to try into your terminal i.e.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-fallback&#34; data-lang=&#34;fallback&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;zsh
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Then you are now using that shell. To exit just type:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-fallback&#34; data-lang=&#34;fallback&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;exit
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&amp;ldquo;Are you really a Devops engineer???&amp;rdquo; I can hear you shouting. Honest I is. So here&amp;rsquo;s some cooler stuff.&lt;/p&gt;
&lt;p&gt;If you want the new shell (zsh in this case) to persist then you need to type:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-fallback&#34; data-lang=&#34;fallback&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;chsh -s /bin/zsh
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;I just realised that &lt;strong&gt;chsh&lt;/strong&gt; might need to be installed first so double check. If for whatever reason zsh is not installed then try the repository for your distro and have another crack at adding it. There are many ways to add the shell to your environment and this is just one. If you want to confirm which shell you are using as default then type:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-fallback&#34; data-lang=&#34;fallback&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;echo $SHELL
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;You may have to log out and back in again to get the terminal to accept the new changes.&lt;/p&gt;
&lt;h2 id=&#34;install-oh-my-zsh&#34;&gt;Install Oh My Zsh
&lt;/h2&gt;&lt;p&gt;OK, so now you&amp;rsquo;re using Zsh and you think so what?&lt;/p&gt;
&lt;p&gt;Well this is the cool bit. There&amp;rsquo;s this plugin called &lt;a href=&#34;https://ohmyz.sh/&#34; target=&#34;_blank&#34; rel=&#34;noreferrer noopener&#34;&gt;Oh My Zsh&lt;/a&gt; that I absolutely love. It makes configuration so much simpler and makes your terminal just look really awesome.&lt;/p&gt;
&lt;p&gt;There are clear instructions on how to install Oh-My-Zsh on their website or on their &lt;a href=&#34;https://github.com/ohmyzsh/ohmyzsh/wiki&#34;&gt;GitHub&lt;/a&gt; page but you can start by inputting:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-gdscript3&#34; data-lang=&#34;gdscript3&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;sh&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;-&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;c&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;in order to install Oh-My-Zsh if you have Curl installed. You can do the same with Wget and instructions are available on the site.&lt;/p&gt;
&lt;h2 id=&#34;installing-the-powerlevel-10k-theme&#34;&gt;Installing the Powerlevel 10K theme
&lt;/h2&gt;&lt;p&gt;If you have read the Oh-My-Zsh website in detail by now, you will see that there are lots of awesome themes you can use and you might want to just stop there. I prefer to use the &lt;a href=&#34;https://github.com/romkatv/powerlevel10k&#34;&gt;Powerlevel10K&lt;/a&gt; theme. In order to use it you first need to install the &lt;a href=&#34;https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Regular.ttf&#34;&gt;MesloLGS NF Regular&lt;/a&gt; font. In Linux this is very easy. Download that font and open it and press &amp;lsquo;Install&amp;rsquo;. See? Told you. Again, instructions are on the Powerlevel10K link above. You might also have to change your font to Meslo NF Regular in your terminal emulator of choice. I choose: Terminator.&lt;/p&gt;
&lt;p&gt;To install the theme with Oh-My-Zsh installed all you need to do is type:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-fallback&#34; data-lang=&#34;fallback&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;assuming you have git installed. If not consult your preferred repository in the usual manner but I assume you have the capacity to install Git and Curl by this point.&lt;/p&gt;
&lt;p&gt;Now to get the most out of Zsh then you need to edit your shiny .zshrc file located in your home or &amp;ldquo;~&amp;rdquo; directory. Type:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-fallback&#34; data-lang=&#34;fallback&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;ZSH_THEME=&amp;#34;powerlevel10k/powerlevel10k&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;at the head of your file using Vim or Nano and save and quit.&lt;/p&gt;
&lt;p&gt;Now in order to make your terminal look something like mine:&lt;/p&gt;
&lt;p&gt;![Cool looking terminal(/zsh-cli.png)&lt;/p&gt;
&lt;p&gt;you need to configure Powerlevel10K by typing in:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-fallback&#34; data-lang=&#34;fallback&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;p10k configure
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This will give you a prompt with some questions about how cool to make your terminal prompt look. They are fairly straightforward. If the icons don&amp;rsquo;t appear just check that you have the Meslo font installed. Maybe exit and open the terminal again if it&amp;rsquo;s playing up. The Linux equivalent of turn it off and on.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://mikerossiter.tech/powerlevel.png&#34;
	
	
	
	loading=&#34;lazy&#34;
	
		alt=&#34;Powerlevel Install&#34;
	
	
&gt;&lt;/p&gt;
&lt;p&gt;Now you have your theme and your shell decided upon. It is time to make it do even cooler stuff. Yes that&amp;rsquo;s right. Now you can:&lt;/p&gt;
&lt;h2 id=&#34;install-plugins&#34;&gt;Install Plugins!
&lt;/h2&gt;&lt;p&gt;This is what separates the hipsters from the imposters(?). I couldn&amp;rsquo;t think of a better analogy, sorry.&lt;/p&gt;
&lt;p&gt;Anyway! There are a few other blogs and guides that show you these plugins and that is because they are super helpful, will increase your general workflow and make you look like a terminal wizard (Gandalf style beard = optional but preferred). We are talking &lt;a href=&#34;https://github.com/zsh-users/zsh-syntax-highlighting/blob/master/INSTALL.md&#34; target=&#34;_blank&#34; rel=&#34;noreferrer noopener&#34;&gt;syntax highlighting&lt;/a&gt; and auto-suggestions! Yeah man!&lt;/p&gt;
&lt;p&gt;Syntax highlighting will show you when a command is not installed by making it red and by making a command that does work, green. Auto-suggestions will show you commands you have run in the past and you can save time by pressing the right arrow key to complete the text. For instance this grey section is the suggestion:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://mikerossiter.tech/suggestion.png&#34;
	
	
	
	loading=&#34;lazy&#34;
	
		alt=&#34;Suggestion&#34;
	
	
&gt;&lt;/p&gt;
&lt;p&gt;And this shows the command that will fail:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://mikerossiter.tech/bad-zsh.png&#34;
	
	
	
	loading=&#34;lazy&#34;
	
		alt=&#34;BAD!&#34;
	
	
&gt;&lt;/p&gt;
&lt;p&gt;And this is when it works:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://mikerossiter.tech/suggest-works.png&#34;
	
	
	
	loading=&#34;lazy&#34;
	
		alt=&#34;GOOD!&#34;
	
	
&gt;&lt;/p&gt;
&lt;p&gt;Simply clone these two repos to the required home location for Oh-My-Zsh:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-fallback&#34; data-lang=&#34;fallback&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git clone https://github.com/zsh-users/zsh-syntax-highlighting.git git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Now you have cloned the repos for the plugins you need to enable them in your .zshrc file. Open the file and search for &amp;ldquo;plugins&amp;rdquo;. You should find a heading and a plugin in brackets. Edit this to look like:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-fallback&#34; data-lang=&#34;fallback&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;plugins=(
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;	zsh-syntax-highlighting
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;	zsh-autosuggestions
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;I have also added &amp;ldquo;git&amp;rdquo;, &amp;ldquo;kubectl&amp;rdquo;, &amp;ldquo;colored-man-pages&amp;rdquo; and &amp;ldquo;terraform&amp;rdquo; to this list among others. I think git is usually already included by default but you can find more plugins at the &lt;a href=&#34;https://github.com/ohmyzsh/ohmyzsh/wiki/Plugins&#34; target=&#34;_blank&#34; rel=&#34;noreferrer noopener&#34;&gt;GitHub repo&lt;/a&gt; for Oh My Zsh plugins. Some of them are simple aliases for commands which I find really useful but others have more elaborate results.&lt;/p&gt;
&lt;h2 id=&#34;conclusion&#34;&gt;Conclusion
&lt;/h2&gt;&lt;p&gt;And away you go! Feel free to experiment with themes and plugins for Zsh to your heart&amp;rsquo;s content. I hope this helped. Feel free to comment, email or even &lt;a href=&#34;https://www.buymeacoffee.com/mikerossiter&#34; target=&#34;_blank&#34; rel=&#34;noreferrer noopener&#34;&gt;buy me a coffee&lt;/a&gt;! Thanks for reading!&lt;/p&gt;
</description>
        </item>
        
    </channel>
</rss>
