<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Krish</title>
    <description>The latest articles on DEV Community by Krish (@krish_agarwal).</description>
    <link>https://dev.to/krish_agarwal</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F827116%2Ff4d55272-039f-4a56-950d-3382ef08b274.png</url>
      <title>DEV Community: Krish</title>
      <link>https://dev.to/krish_agarwal</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/krish_agarwal"/>
    <language>en</language>
    <item>
      <title>Setup guide for ZSH in GitHub codespaces</title>
      <dc:creator>Krish</dc:creator>
      <pubDate>Sun, 26 Jun 2022 07:21:04 +0000</pubDate>
      <link>https://dev.to/krish_agarwal/setup-guide-for-zsh-in-github-codespaces-5152</link>
      <guid>https://dev.to/krish_agarwal/setup-guide-for-zsh-in-github-codespaces-5152</guid>
      <description>&lt;h1&gt;
  
  
  Setup ZSH
&lt;/h1&gt;

&lt;p&gt;This post will guide you through to set up starship along with zsh suggestions and zsh syntax highlight for your codespaces.&lt;/p&gt;

&lt;h1&gt;
  
  
  Table of Contents
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;Setup Starship&lt;/li&gt;
&lt;li&gt;Install Auto Suggestions&lt;/li&gt;
&lt;li&gt;Install ZSH Syntax Highlighting&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  &lt;a href="https://starship.rs/"&gt;Setup Starship&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;This is an optional package if you want to beautify your terminal. Else you can also use any other ZSH themes.&lt;/p&gt;

&lt;h3&gt;
  
  
  Install starship
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;You cannot install starship in ZSH shell at the time of writing this. You can switch to bash.&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-sS&lt;/span&gt; https://starship.rs/install.sh | sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Setup the config in the ZSH file
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"eval &lt;/span&gt;&lt;span class="se"&gt;\"\$&lt;/span&gt;&lt;span class="s2"&gt;(starship init zsh)&lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;ZSOTDIR&lt;/span&gt;&lt;span class="k"&gt;:-&lt;/span&gt;&lt;span class="nv"&gt;$HOME&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;/.zshrc
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  &lt;a href="https://github.com/zsh-users/"&gt;Install ZSH Auto Suggestions&lt;/a&gt;
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Clone the repository
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/zsh-users/zsh-autosuggestions ~/.zsh/zsh-autosuggestions
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;You can change the path to anything you want. Here we use &lt;code&gt;~/.zsh/zsh-autosuggestions&lt;/code&gt;&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;ol&gt;
&lt;li&gt;Add the invoke script to the ZSH config
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh"&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;ZSOTDIR&lt;/span&gt;&lt;span class="k"&gt;:-&lt;/span&gt;&lt;span class="nv"&gt;$HOME&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;/.zshrc
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  &lt;a href="https://github.com/zsh-users/zsh-syntax-highlighting/"&gt;Install ZSH Syntax Highlighting&lt;/a&gt;
&lt;/h1&gt;

&lt;ol&gt;
&lt;li&gt;Clone the repository
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ~/.zsh/zsh-syntax-highlighting
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Add the invoke script to the ZSH config
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"source ~/.zsh/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh"&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;ZDOTDIR&lt;/span&gt;&lt;span class="k"&gt;:-&lt;/span&gt;&lt;span class="nv"&gt;$HOME&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;/.zshrc
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;Note: If you see a &lt;code&gt;Systemd&lt;/code&gt; in the terminal and want to remove it then follow the next command&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;mkdir&lt;/span&gt; &lt;span class="nt"&gt;-p&lt;/span&gt; ~/.config &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nb"&gt;printf&lt;/span&gt; &lt;span class="s2"&gt;"[container]&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;disabled = true"&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&amp;gt;&lt;/span&gt; ~/.config/starship.toml
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Voila! You are ready to use ZSH with Starship and ZSH Auto Suggestions and Syntax Highlighting.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If you like it consider following me on &lt;a href="https://github.com/krishagarwal2811"&gt;github&lt;/a&gt;&lt;/p&gt;

</description>
      <category>github</category>
      <category>codespaces</category>
      <category>zsh</category>
      <category>starship</category>
    </item>
  </channel>
</rss>
