<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to 585: Windows: Access to positional command-line arguments (ARGV/ARGC)</title><link>https://sourceforge.net/p/gnuplot/feature-requests/585/</link><description>Recent changes to 585: Windows: Access to positional command-line arguments (ARGV/ARGC)</description><atom:link href="https://sourceforge.net/p/gnuplot/feature-requests/585/feed.rss" rel="self"/><language>en</language><lastBuildDate>Mon, 12 May 2025 07:34:07 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/gnuplot/feature-requests/585/feed.rss" rel="self" type="application/rss+xml"/><item><title>#585 Windows: Access to positional command-line arguments (ARGV/ARGC)</title><link>https://sourceforge.net/p/gnuplot/feature-requests/585/?limit=25#2d8d</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;OK, my suggestion basically boils down to reduce the length of the commandline from&lt;br/&gt;
&lt;code&gt;gnuplot -c plot.gp data.txt foo.png&lt;/code&gt;&lt;br/&gt;
to&lt;br/&gt;
&lt;code&gt;plot.gp data.txt foo.png&lt;/code&gt; on Windows.&lt;/p&gt;
&lt;p&gt;Reconsidering this suggestion, I now think this is not worth the hassle. &lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Daniel Dan K.</dc:creator><pubDate>Mon, 12 May 2025 07:34:07 -0000</pubDate><guid>https://sourceforge.net21b775393cf263407f29831f75df63630acb92f3</guid></item><item><title>#585 Windows: Access to positional command-line arguments (ARGV/ARGC)</title><link>https://sourceforge.net/p/gnuplot/feature-requests/585/?limit=25#9bf3</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Another alternative came to my mind: honor command line flags and options when called by a script, e.g.,&lt;br/&gt;
&lt;code&gt;plot.gp -c data.txt foo.png&lt;/code&gt;&lt;br/&gt;
Yet I don't even know if that is possible in Windows.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Daniel Dan K.</dc:creator><pubDate>Wed, 16 Apr 2025 11:35:12 -0000</pubDate><guid>https://sourceforge.net0ec66b5481519acc9c7459bc96d3f62cfeaeb66d</guid></item><item><title>Windows: Access to positional command-line arguments (ARGV/ARGC)</title><link>https://sourceforge.net/p/gnuplot/feature-requests/585/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;tl;dr: How to call gnuplot through a gnuplot script and have positional parameters available?&lt;/p&gt;
&lt;p&gt;On Windows, the extension &lt;strong&gt;.gp&lt;/strong&gt; is associated with gnuplot. I think this is done by the installer. Anyway, when a gnuplot script has the suffix &lt;strong&gt;.gp&lt;/strong&gt;,e.g., &lt;strong&gt;plot.gp&lt;/strong&gt;, I can enter &lt;strong&gt;plot.gp&lt;/strong&gt; on the Windows commandline and gnuplot gets called and executes this script.&lt;/p&gt;
&lt;p&gt;Further, I know that positional parameters can be activated by adding the flag "-c" to the command line, e.g., &lt;br/&gt;
&lt;code&gt;gnuplot -c plot.gp data.txt foo.png&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;However, with the simple file association available in Windows, I cannot add the flag "-c" to the commandline without manually fiddling in the registry, can I? Is there a simple way to activate positional parameters when scripting gnuplot on Windows?&lt;/p&gt;
&lt;p&gt;If this is not yet possible, I'd like to suggest  to implement a "Windows shebang" feature: &lt;br/&gt;
I suggest that command line parameters and flags can be conveyed to gnuplot by adding them to the first line in the script which is marked with "#!", for example:&lt;br/&gt;
&lt;code&gt;#! -c&lt;/code&gt;&lt;br/&gt;
would pass the flag "-c" to gnuplot in order to activate positional parameters.&lt;/p&gt;
&lt;p&gt;Alternatively, always activate positional parameters when called by a script.&lt;/p&gt;
&lt;p&gt;Does that make sense? Please let me have your comments. Thanks.&lt;br/&gt;
Dan&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Daniel Dan K.</dc:creator><pubDate>Wed, 16 Apr 2025 11:10:29 -0000</pubDate><guid>https://sourceforge.net4aec93e7e33d3d7cdfd686dee8e5a8ea68352dfe</guid></item></channel></rss>