<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Ashish Jha]]></title><description><![CDATA[I'm an enthusiastic Software Developer with over 5 years of experience, specializing in backend development. Tech stack includes .NET, C#, SQL, Azure, Microserv]]></description><link>https://blog.ashishjha.dev</link><generator>RSS for Node</generator><lastBuildDate>Wed, 15 Apr 2026 23:44:36 GMT</lastBuildDate><atom:link href="https://blog.ashishjha.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Supercharge Your PowerShell: A Step-by-Step Guide to a Beautiful and Powerful Terminal]]></title><description><![CDATA[Introduction
Are you tired of the bland, default PowerShell prompt? Do you dream of a terminal that's both visually appealing and highly functional? In this guide, I'll walk you through customizing your Windows Terminal and PowerShell to create a tru...]]></description><link>https://blog.ashishjha.dev/enhance-your-powershell-terminal-a-step-by-step-guide</link><guid isPermaLink="true">https://blog.ashishjha.dev/enhance-your-powershell-terminal-a-step-by-step-guide</guid><category><![CDATA[cascadia code font]]></category><category><![CDATA[Terminal icons]]></category><category><![CDATA[PSReadLine]]></category><category><![CDATA[PowerShell Core]]></category><category><![CDATA[Powershell]]></category><category><![CDATA[windows terminal]]></category><category><![CDATA[oh-my-posh]]></category><dc:creator><![CDATA[Ashish Jha]]></dc:creator><pubDate>Sat, 01 Mar 2025 18:30:00 GMT</pubDate><content:encoded><![CDATA[<h3 id="heading-introduction">Introduction</h3>
<p>Are you tired of the bland, default PowerShell prompt? Do you dream of a terminal that's both visually appealing and highly functional? In this guide, I'll walk you through customizing your Windows Terminal and PowerShell to create a truly personalized and powerful command-line experience.</p>
<h3 id="heading-getting-started-windows-terminal-and-powershell-core">Getting Started: Windows Terminal and PowerShell Core</h3>
<p>First, ensure you have the necessary tools:</p>
<ul>
<li><p><strong>Windows Terminal</strong>: It's a modern, fast, and highly customizable terminal application.<br />  If you don’t have it already, you can get it from the following sources:</p>
<ul>
<li><p><a target="_blank" href="https://apps.microsoft.com/detail/9N0DX20HK701">Microsoft store</a></p>
</li>
<li><p><a target="_blank" href="https://github.com/microsoft/terminal?tab=readme-ov-file#installing-and-running-windows-terminal">Other ways of installing Windows Terminal - GitHub, Winget, Chocolatey and Scoop</a></p>
</li>
</ul>
</li>
<li><p><strong>PowerShell</strong>: For the best experience, use the latest cross-platform PowerShell Core.<br />  You can get it from multiple sources.</p>
<ul>
<li><p><a target="_blank" href="https://learn.microsoft.com/en-us/powershell/scripting/install/installing-powershell-on-windows?view=powershell-7.5#install-powershell-using-winget-recommended">Using WinGet</a></p>
<pre><code class="lang-powershell">  winget install -<span class="hljs-literal">-id</span> Microsoft.PowerShell -<span class="hljs-literal">-source</span> winget
</code></pre>
</li>
<li><p><a target="_blank" href="https://apps.microsoft.com/detail/9N0DX20HK701">Microsoft Store</a></p>
</li>
</ul>
</li>
</ul>
<h3 id="heading-upgrade-your-terminalpowershell-fonts">Upgrade your Terminal/PowerShell fonts</h3>
<p>A beautiful terminal starts with a great font, and Windows Terminal comes with a lovely font called Cascadia Code, a monospaced font from Microsoft designed for coding, but we will upgrade it to get more variant of this. Upgrading to the latest Cascadia Code release provides access to 'NF' (Nerd Fonts) variants, which include a wider range of glyphs and icons for enhanced terminal aesthetics.</p>
<ul>
<li><p><strong>Installing</strong> <a target="_blank" href="https://github.com/microsoft/cascadia-code/blob/main/README.md"><strong>Cascadia Code Font</strong></a></p>
<ol>
<li><p>Download the latest stable release of <a target="_blank" href="https://github.com/microsoft/cascadia-code/releases">Cascadia Code Font from GitHub</a>.</p>
</li>
<li><p>Extract the downloaded archive.</p>
</li>
<li><p>Navigate to the <code>ttf</code> folder.</p>
</li>
<li><p>Select all the <code>.ttf</code> files at the root of the folder (not inside the static folder) and install them.</p>
</li>
</ol>
</li>
<li><p><strong>Updating the font in Windows Terminal</strong></p>
<ol>
<li><p>Open Terminal</p>
</li>
<li><p>Go to the Terminal Settings</p>
</li>
<li><p>Profiles → Default</p>
</li>
<li><p>Additional Settings → Appearance → Font Face</p>
</li>
<li><p>Choose the <code>Cascadia Code NF</code> and save.</p>
</li>
</ol>
</li>
</ul>
<p>    <img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1742119717080/b3a595b0-9c74-40f1-879a-3e49b63fc572.png" alt class="image--center mx-auto" /></p>
<h3 id="heading-adding-icons-with-terminal-icons">Adding Icons with Terminal-Icons</h3>
<p>Let's add some visual flair by displaying icons for files and folders.</p>
<ul>
<li><p>Open PowerShell (as administrator) and run:</p>
<pre><code class="lang-powershell">  <span class="hljs-built_in">Install-Module</span> <span class="hljs-literal">-Name</span> Terminal<span class="hljs-literal">-Icons</span> <span class="hljs-literal">-Repository</span> PSGallery
</code></pre>
</li>
</ul>
<p>Next, add the <code>Terminal-Icons</code> module to your PowerShell profile.</p>
<ul>
<li><p>Open your PowerShell profile with:</p>
<pre><code class="lang-powershell">  notepad <span class="hljs-variable">$profile</span>
</code></pre>
</li>
<li><p>If the file doesn't exist, you can find the profile path using <code>echo $profile</code> and create the file manually.</p>
</li>
<li><p>Add the following line to your profile:</p>
<pre><code class="lang-powershell">  <span class="hljs-built_in">Import-Module</span> <span class="hljs-literal">-Name</span> Terminal<span class="hljs-literal">-Icons</span>
</code></pre>
</li>
<li><p>Save the file and either restart your terminal or reload your profile with <code>.$profile</code>.</p>
</li>
</ul>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1742120406289/94fc0d47-6fc1-429f-b62a-dade0572599c.png" alt /></p>
<h3 id="heading-beautifying-your-prompt-with-oh-my-posh">Beautifying Your Prompt with Oh-My-Posh</h3>
<p><a target="_blank" href="https://ohmyposh.dev">Oh-My-Posh</a> is a powerful theming engine for your terminal. Oh-My-Posh allows you to customize your prompt with various themes and segments, including information about your Git status, current directory, and more. Segments are small pieces of information that can be added to your prompt, like the current time, or the state of your git repository.</p>
<ul>
<li><p><a target="_blank" href="https://ohmyposh.dev/docs/installation/windows">Install Oh-My-Posh</a> using Winget (or your preferred method):</p>
<pre><code class="lang-powershell">  winget install -<span class="hljs-literal">-id</span> JanDeDobbeleer.OhMyPosh -<span class="hljs-literal">-source</span> winget
</code></pre>
</li>
<li><p>Customize your prompt with a theme.</p>
<ul>
<li><p>Oh-My-Posh offers a wide range of <a target="_blank" href="https://ohmyposh.dev/docs/themes">themes</a>.</p>
</li>
<li><p>To use a theme, add the following line to your PowerShell profile, replacing <code>jandedobbeleer.omp.json</code> with your chosen theme:</p>
<pre><code class="lang-powershell">  <span class="hljs-built_in">oh</span><span class="hljs-literal">-my</span><span class="hljs-literal">-posh</span> init pwsh -<span class="hljs-literal">-config</span> <span class="hljs-string">"<span class="hljs-variable">$env:POSH_THEMES_PATH</span>\jandedobbeleer.omp.json"</span> | <span class="hljs-built_in">Invoke-Expression</span>
</code></pre>
</li>
<li><p>You can also create a custom theme by mixing and matching elements from different themes as well as adding any segments available for oh-my-posh.<br />  Customized <a target="_blank" href="https://1drv.ms/u/c/72ffa50fc6101fef/ERtbvWEyfjBIhxH-ScRwpp0Be6jRP8L-MGCcms1BvfzdYQ?e=knlLCk">theme</a> which I use.</p>
</li>
<li><p>Remember to replace the theme name with the one you want to use.</p>
</li>
</ul>
</li>
</ul>
<p>    <img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1742120887674/5230b237-c6e2-4851-bebb-43a0510c34d3.png" alt class="image--center mx-auto" /></p>
<h3 id="heading-enhancing-command-line-editing-with-psreadline">Enhancing Command-Line Editing with PSReadLine</h3>
<p><a target="_blank" href="https://github.com/PowerShell/PSReadLine">PSReadLine</a> provides a rich command-line editing experience. PSReadLine enhances command-line editing with features like command history search, tab completion, and predictive IntelliSense.</p>
<ul>
<li><p>PowerShell Core comes with PSReadLine pre-installed. If it's not present, install it with:</p>
<pre><code class="lang-powershell">  <span class="hljs-built_in">Install-Module</span> <span class="hljs-literal">-Name</span> PSReadLine <span class="hljs-literal">-Repository</span> PSGallery <span class="hljs-literal">-Force</span>
</code></pre>
</li>
<li><p>Add the following line to your PowerShell profile</p>
<pre><code class="lang-powershell">  <span class="hljs-built_in">Import-Module</span> PSReadLine
</code></pre>
</li>
<li><p>PSReadLine offers extensive customization options. Check out the <a target="_blank" href="https://github.com/PowerShell/PSReadLine/blob/master/README.md">documentation</a> and <a target="_blank" href="https://github.com/PowerShell/PSReadLine/blob/master/PSReadLine/SamplePSReadLineProfile.ps1">sample profile</a>.</p>
</li>
<li><p>This is the configuration which I use for PSReadLine</p>
<pre><code class="lang-powershell">  <span class="hljs-built_in">Import-Module</span> PSReadLine

  <span class="hljs-built_in">Set-PSReadLineOption</span> <span class="hljs-literal">-EditMode</span> Windows

  <span class="hljs-comment"># Searching for commands with up/down arrow is really handy.</span>
  <span class="hljs-built_in">Set-PSReadLineOption</span> <span class="hljs-literal">-PredictionSource</span> <span class="hljs-built_in">History</span>
  <span class="hljs-built_in">Set-PSReadLineKeyHandler</span> <span class="hljs-literal">-Key</span> UpArrow <span class="hljs-literal">-Function</span> HistorySearchBackward
  <span class="hljs-built_in">Set-PSReadLineKeyHandler</span> <span class="hljs-literal">-Key</span> DownArrow <span class="hljs-literal">-Function</span> HistorySearchForward

  <span class="hljs-comment"># The option "moves to end" is useful if you want the cursor at the end</span>
  <span class="hljs-comment"># of the line while cycling through history like it does w/o searching,</span>
  <span class="hljs-comment"># without that option, the cursor will remain at the position it was</span>
  <span class="hljs-comment"># when you used up arrow, which can be useful if you forget the exact</span>
  <span class="hljs-comment"># string you started the search on.</span>
  <span class="hljs-built_in">Set-PSReadLineOption</span> <span class="hljs-literal">-HistorySearchCursorMovesToEnd</span>

  <span class="hljs-comment"># Instead of Inline suggestion (in grey) on search</span>
  <span class="hljs-comment"># if you like the suggestion in list which you can choose by up or down arrow</span>
  <span class="hljs-comment"># within the list, you can change the prediction view style</span>
  <span class="hljs-built_in">Set-PSReadLineOption</span> <span class="hljs-literal">-PredictionViewStyle</span> ListView

  <span class="hljs-built_in">Set-PSReadLineKeyHandler</span> <span class="hljs-literal">-Key</span> Tab <span class="hljs-literal">-Function</span> Complete
</code></pre>
</li>
<li><p>Your final <a target="_blank" href="https://1drv.ms/u/c/72ffa50fc6101fef/EcAbC81beElKrgzQLJ62G1kBkMjv0T3c-nEQUL8i1ZCQmQ?e=mfF1Sk">PowerShell profile</a> may look like something like this:</p>
<pre><code class="lang-powershell">  <span class="hljs-comment"># Include Terminal Icons</span>
  <span class="hljs-built_in">Import-Module</span> <span class="hljs-literal">-Name</span> Terminal<span class="hljs-literal">-Icons</span>

  <span class="hljs-comment"># Include oh-my-posh theme</span>
  <span class="hljs-built_in">oh</span><span class="hljs-literal">-my</span><span class="hljs-literal">-posh</span> init pwsh -<span class="hljs-literal">-config</span> <span class="hljs-string">"C:\WindowsTerminal-Powershell\oh-my-posh-theme.json"</span> | <span class="hljs-built_in">Invoke-Expression</span>

  <span class="hljs-built_in">Import-Module</span> PSReadLine

  <span class="hljs-built_in">Set-PSReadLineOption</span> <span class="hljs-literal">-EditMode</span> Windows

  <span class="hljs-comment"># Searching for commands with up/down arrow is really handy.</span>
  <span class="hljs-built_in">Set-PSReadLineOption</span> <span class="hljs-literal">-PredictionSource</span> <span class="hljs-built_in">History</span>
  <span class="hljs-built_in">Set-PSReadLineKeyHandler</span> <span class="hljs-literal">-Key</span> UpArrow <span class="hljs-literal">-Function</span> HistorySearchBackward
  <span class="hljs-built_in">Set-PSReadLineKeyHandler</span> <span class="hljs-literal">-Key</span> DownArrow <span class="hljs-literal">-Function</span> HistorySearchForward

  <span class="hljs-comment"># The option "moves to end" is useful if you want the cursor at the end</span>
  <span class="hljs-comment"># of the line while cycling through history like it does w/o searching,</span>
  <span class="hljs-comment"># without that option, the cursor will remain at the position it was</span>
  <span class="hljs-comment"># when you used up arrow, which can be useful if you forget the exact</span>
  <span class="hljs-comment"># string you started the search on.</span>
  <span class="hljs-built_in">Set-PSReadLineOption</span> <span class="hljs-literal">-HistorySearchCursorMovesToEnd</span>

  <span class="hljs-comment"># Instead of Inline suggestion (in grey) on search</span>
  <span class="hljs-comment"># if you like the suggestion in list which you can choose by up or down arrow</span>
  <span class="hljs-comment"># within the list, you can change the prediction view style</span>
  <span class="hljs-built_in">Set-PSReadLineOption</span> <span class="hljs-literal">-PredictionViewStyle</span> ListView

  <span class="hljs-built_in">Set-PSReadLineKeyHandler</span> <span class="hljs-literal">-Key</span> Tab <span class="hljs-literal">-Function</span> Complete
</code></pre>
<p>  <img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1742121104529/7e3eea80-c9d6-48ab-96b4-27803cf9feb5.png" alt class="image--center mx-auto" /></p>
</li>
</ul>
]]></content:encoded></item></channel></rss>