<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Command Line on Nalar</title>
    <link>https://nalar.dev/tags/command-line/</link>
    <description>Recent content in Command Line on Nalar</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <lastBuildDate>Thu, 03 Sep 2026 00:00:00 +0700</lastBuildDate>
    <atom:link href="https://nalar.dev/tags/command-line/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Parse and Render Shell Arguments Safely with Python shlex</title>
      <link>https://nalar.dev/parse-and-render-shell-arguments-safely-with-python-shlex/</link>
      <pubDate>Thu, 03 Sep 2026 00:00:00 +0700</pubDate>
      <guid>https://nalar.dev/parse-and-render-shell-arguments-safely-with-python-shlex/</guid>
      <description>&lt;p&gt;Command-line text looks deceptively simple. Splitting on spaces works until an argument contains whitespace. Concatenating strings works until a filename contains shell metacharacters. Logging a list of arguments works, but the result may be difficult for a human to copy and inspect.&lt;/p&gt;&#xA;&lt;p&gt;Python&amp;rsquo;s &lt;code&gt;shlex&lt;/code&gt; module handles a useful middle ground: shell-like lexical analysis for Unix-style command text. Its &lt;code&gt;split()&lt;/code&gt;, &lt;code&gt;quote()&lt;/code&gt;, and &lt;code&gt;join()&lt;/code&gt; helpers let programs move deliberately between a string representation and a sequence of argument tokens.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
