<?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: Dipaditya Das</title>
    <description>The latest articles on DEV Community by Dipaditya Das (@dipadityadas).</description>
    <link>https://dev.to/dipadityadas</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F410379%2F373e51a3-549b-487b-b18e-8f71be9e90ec.png</url>
      <title>DEV Community: Dipaditya Das</title>
      <link>https://dev.to/dipadityadas</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/dipadityadas"/>
    <language>en</language>
    <item>
      <title>O(N) Manacher's Algorithm with Mirror Boundary Optimization</title>
      <dc:creator>Dipaditya Das</dc:creator>
      <pubDate>Wed, 15 Jul 2026 18:36:13 +0000</pubDate>
      <link>https://dev.to/dipadityadas/beats-9944-on-manachers-algorithm-with-mirror-boundary-optimization-3lec</link>
      <guid>https://dev.to/dipadityadas/beats-9944-on-manachers-algorithm-with-mirror-boundary-optimization-3lec</guid>
      <description>&lt;h1&gt;
  
  
  Intuition
&lt;/h1&gt;

&lt;p&gt;Manacher's Algorithm leverages the symmetry of palindromes to avoid redundant comparisons. Instead of treating odd- and even-length palindromes separately, the input string is transformed by inserting a special character (#) between every character and adding sentinel characters (^ and $) at both ends. This allows every palindrome to be treated as an odd-length palindrome.&lt;/p&gt;

&lt;p&gt;While traversing the transformed string, the algorithm maintains the center and right boundary of the rightmost palindrome found so far. For each position, it uses the palindrome information from its mirror position (with respect to the current center) to initialize the palindrome radius, significantly reducing unnecessary expansions. Only when the palindrome reaches beyond the current right boundary is additional expansion performed.&lt;/p&gt;

&lt;p&gt;This optimization ensures that every character is expanded at most a constant number of times, resulting in linear time complexity.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F99f6ltoj25ivf3sp9zyr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F99f6ltoj25ivf3sp9zyr.png" alt="Screenshot 2026-07-16 000333.png" width="798" height="194"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Approach
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;Handle the edge case by returning an empty string if the input string is empty.&lt;/li&gt;
&lt;li&gt;Transform the input string by inserting # between every character and adding sentinel characters (^ and $) at both ends to treat odd- and even-length palindromes uniformly.&lt;/li&gt;
&lt;li&gt;Create a palindrome radius array p, where p[i] stores the radius of the palindrome centered at index i in the transformed string.&lt;/li&gt;
&lt;li&gt;Initialize the variables center and right to represent the center and right boundary of the current rightmost palindrome.&lt;/li&gt;
&lt;li&gt;Initialize max_len and center_index to keep track of the longest palindrome found during traversal.&lt;/li&gt;
&lt;li&gt;Traverse the transformed string from left to right, ignoring the sentinel characters.&lt;/li&gt;
&lt;li&gt;Compute the mirror index of the current position using the current palindrome's center.&lt;/li&gt;
&lt;li&gt;If the current index lies within the current right boundary, initialize its palindrome radius using the previously computed mirror information.&lt;/li&gt;
&lt;li&gt;Expand around the current center while the characters on both sides are equal, increasing the palindrome radius accordingly.&lt;/li&gt;
&lt;li&gt;If the expanded palindrome extends beyond the current right boundary, update the center and right variables.&lt;/li&gt;
&lt;li&gt;If the current palindrome is longer than the previously recorded longest palindrome, update max_len and center_index.&lt;/li&gt;
&lt;li&gt;Convert the center position from the transformed string back to the corresponding starting index in the original string.&lt;/li&gt;
&lt;li&gt;Return the longest palindromic substring using the calculated starting index and maximum length.&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Complexity
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Time complexity: &lt;code&gt;O(n)&lt;/code&gt;&lt;br&gt;
Each character in the transformed string is expanded at most once beyond the current right boundary. Thanks to the mirror optimization, redundant comparisons are eliminated, giving an overall linear runtime.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Space complexity: &lt;code&gt;O(n)&lt;/code&gt;&lt;br&gt;
Additional space is used for the transformed string and the palindrome radius array (p).&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Code
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Solution&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;longestPalindrome&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="sh"&gt;""&lt;/span&gt;

        &lt;span class="c1"&gt;# Transform the string to handle even and odd palindromes uniformly.
&lt;/span&gt;        &lt;span class="c1"&gt;# Example:
&lt;/span&gt;        &lt;span class="c1"&gt;# "abba" -&amp;gt; "^#a#b#b#a#$"
&lt;/span&gt;        &lt;span class="n"&gt;t&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;^#&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;#&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;join&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;#$&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
        &lt;span class="n"&gt;n&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;t&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

        &lt;span class="c1"&gt;# p[i] = radius of palindrome centered at i
&lt;/span&gt;        &lt;span class="n"&gt;p&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;n&lt;/span&gt;

        &lt;span class="n"&gt;center&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;
        &lt;span class="n"&gt;right&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;

        &lt;span class="n"&gt;max_len&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;
        &lt;span class="n"&gt;center_index&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;

        &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="nf"&gt;range&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;n&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;

            &lt;span class="n"&gt;mirror&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;center&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt;

            &lt;span class="c1"&gt;# Use previously computed palindrome information
&lt;/span&gt;            &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="n"&gt;right&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
                &lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;min&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;right&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;mirror&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;

            &lt;span class="c1"&gt;# Expand around center i
&lt;/span&gt;            &lt;span class="k"&gt;while&lt;/span&gt; &lt;span class="n"&gt;t&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="n"&gt;t&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;]:&lt;/span&gt;
                &lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;

            &lt;span class="c1"&gt;# Update center and right boundary
&lt;/span&gt;            &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;right&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
                &lt;span class="n"&gt;center&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt;
                &lt;span class="n"&gt;right&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;

            &lt;span class="c1"&gt;# Track the longest palindrome
&lt;/span&gt;            &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;max_len&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
                &lt;span class="n"&gt;max_len&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
                &lt;span class="n"&gt;center_index&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt;

        &lt;span class="c1"&gt;# Convert index in transformed string back to original string
&lt;/span&gt;        &lt;span class="n"&gt;start&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;center_index&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;max_len&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;//&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;

        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;start&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="n"&gt;start&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;max_len&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>coding</category>
      <category>algorithms</category>
      <category>python</category>
      <category>dsa</category>
    </item>
    <item>
      <title>ZSH + Starship: A Better Shell Experience for Linux Power Users</title>
      <dc:creator>Dipaditya Das</dc:creator>
      <pubDate>Thu, 16 Apr 2026 17:58:26 +0000</pubDate>
      <link>https://dev.to/dipadityadas/zsh-manager-for-fedora-based-systems-kbb</link>
      <guid>https://dev.to/dipadityadas/zsh-manager-for-fedora-based-systems-kbb</guid>
      <description>&lt;h3&gt;
  
  
  🚀  A Production-Ready Shell Lifecycle Manager with Starship Integration
&lt;/h3&gt;




&lt;h2&gt;
  
  
  🔗 GitHub Repository
&lt;/h2&gt;

&lt;p&gt;👉 &lt;a href="https://github.com/DipadityaDas/InstallZsh.git" rel="noopener noreferrer"&gt;https://github.com/DipadityaDas/InstallZsh.git&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  🐚 What is ZSH (and Why Use It?)
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;ZSH (Z Shell)&lt;/strong&gt; is an advanced Unix shell designed to be a more powerful and user-friendly alternative to Bash.&lt;/p&gt;

&lt;p&gt;It provides:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Smarter tab completion&lt;/li&gt;
&lt;li&gt;Command auto-suggestions&lt;/li&gt;
&lt;li&gt;Better globbing and scripting capabilities&lt;/li&gt;
&lt;li&gt;Plugin ecosystem (via frameworks or standalone plugins)&lt;/li&gt;
&lt;li&gt;Improved developer ergonomics&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For power users and engineers, ZSH significantly enhances productivity compared to traditional shells.&lt;/p&gt;




&lt;h2&gt;
  
  
  ⚡ What is Starship?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Starship&lt;/strong&gt; is a fast, minimal, and highly customizable cross-shell prompt.&lt;/p&gt;

&lt;p&gt;Instead of heavy frameworks, Starship delivers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Blazing-fast prompt rendering (written in Rust)&lt;/li&gt;
&lt;li&gt;Git-aware status indicators&lt;/li&gt;
&lt;li&gt;Language/runtime detection (Node, Python, etc.)&lt;/li&gt;
&lt;li&gt;Clean and consistent prompt across shells&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It integrates seamlessly with ZSH and replaces traditional prompt customization approaches.&lt;/p&gt;




&lt;h2&gt;
  
  
  🔍 Why This Project Exists
&lt;/h2&gt;

&lt;p&gt;In real-world environments (especially shared systems, lab setups, or enterprise fleets), manually configuring ZSH per user introduces:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Configuration drift&lt;/li&gt;
&lt;li&gt;Broken environments&lt;/li&gt;
&lt;li&gt;No rollback strategy&lt;/li&gt;
&lt;li&gt;Inconsistent developer experience&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This tool solves those problems with a &lt;strong&gt;state-driven and reversible approach&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  📦 Key Features
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;✅ Per-user installation and rollback&lt;/li&gt;
&lt;li&gt;✅ Deterministic state tracking&lt;/li&gt;
&lt;li&gt;✅ Safe &lt;code&gt;.zshrc&lt;/code&gt; deployment (non-destructive)&lt;/li&gt;
&lt;li&gt;✅ Starship prompt integration&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;✅ Plugin management:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;autosuggestions&lt;/li&gt;
&lt;li&gt;syntax highlighting&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;&lt;p&gt;✅ Full cleanup mode&lt;/p&gt;&lt;/li&gt;

&lt;li&gt;&lt;p&gt;✅ Centralized logging&lt;/p&gt;&lt;/li&gt;

&lt;/ul&gt;




&lt;h2&gt;
  
  
  ⚙️ Supported Systems
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Fedora&lt;/li&gt;
&lt;li&gt;RHEL&lt;/li&gt;
&lt;li&gt;AlmaLinux&lt;/li&gt;
&lt;li&gt;Rocky Linux&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🚀 Quick Start
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Download the Script
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/DipadityaDas/InstallZsh.git
&lt;span class="nb"&gt;cd &lt;/span&gt;InstallZsh
&lt;span class="nb"&gt;chmod&lt;/span&gt; +x zsh_manager.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  2. Install ZSH for a User
&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;sudo&lt;/span&gt; ./zsh_manager.sh &lt;span class="nb"&gt;install&lt;/span&gt; &amp;lt;username&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&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;sudo&lt;/span&gt; ./zsh_manager.sh &lt;span class="nb"&gt;install &lt;/span&gt;dipaditya
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  🔧 What the Script Does
&lt;/h2&gt;

&lt;p&gt;Behind the scenes, the script:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Saves the current shell state&lt;/li&gt;
&lt;li&gt;Installs dependencies:

&lt;ul&gt;
&lt;li&gt;zsh, git, fzf, curl&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Enables Starship via COPR&lt;/li&gt;

&lt;li&gt;Installs plugins:

&lt;ul&gt;
&lt;li&gt;zsh-autosuggestions&lt;/li&gt;
&lt;li&gt;zsh-syntax-highlighting&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Deploys configs:

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;/etc/starship/starship.toml&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;~/.zshrc&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Switches the user shell to ZSH&lt;/li&gt;

&lt;/ul&gt;




&lt;h2&gt;
  
  
  🔍 Check Status
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo&lt;/span&gt; ./zsh_manager.sh status &amp;lt;username&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  🔄 Revert Anytime (Safely)
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Standard Revert
&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;sudo&lt;/span&gt; ./zsh_manager.sh revert &amp;lt;username&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Full Cleanup Mode
&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;sudo&lt;/span&gt; ./zsh_manager.sh revert &amp;lt;username&amp;gt; &lt;span class="nt"&gt;--full-cleanup&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  📂 File Structure
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Path&lt;/th&gt;
&lt;th&gt;Purpose&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;/var/lib/zsh_manager/&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;State tracking&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;/var/log/zsh_manager.log&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Logs&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;/etc/starship/starship.toml&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Global config&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;~/.zshrc&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;User config&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  🛡️ Safety First
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;State-based rollback (no guesswork)&lt;/li&gt;
&lt;li&gt;Existing &lt;code&gt;.zshrc&lt;/code&gt; is preserved&lt;/li&gt;
&lt;li&gt;System users are skipped&lt;/li&gt;
&lt;li&gt;Designed for idempotent execution&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🧪 Example Workflow
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo&lt;/span&gt; ./zsh_manager.sh &lt;span class="nb"&gt;install &lt;/span&gt;dipaditya
&lt;span class="nb"&gt;sudo&lt;/span&gt; ./zsh_manager.sh status dipaditya
&lt;span class="nb"&gt;sudo&lt;/span&gt; ./zsh_manager.sh revert dipaditya
&lt;span class="nb"&gt;sudo&lt;/span&gt; ./zsh_manager.sh revert dipaditya &lt;span class="nt"&gt;--full-cleanup&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  💡 Future Enhancements
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Dry-run mode (&lt;code&gt;--dry-run&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Bulk user operations (&lt;code&gt;--all-users&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;RPM packaging&lt;/li&gt;
&lt;li&gt;Ansible role integration&lt;/li&gt;
&lt;li&gt;Version flag support&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  📜 License
&lt;/h2&gt;

&lt;p&gt;MIT License&lt;/p&gt;




&lt;h2&gt;
  
  
  👨‍💻 Author
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Dipaditya Das&lt;/strong&gt;&lt;/p&gt;




&lt;p&gt;If you’re managing multiple Linux users and want a &lt;strong&gt;clean, reversible, and automated ZSH setup with a modern Starship prompt&lt;/strong&gt;, this approach will significantly reduce manual effort and eliminate configuration drift.&lt;/p&gt;

&lt;p&gt;Feedback, issues, and contributions are welcome on GitHub.&lt;/p&gt;

</description>
      <category>automation</category>
      <category>devops</category>
      <category>zsh</category>
      <category>linux</category>
    </item>
  </channel>
</rss>
