<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 02:55:10 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>Whamcloud Community JIRA</title>
    <link>https://jira.whamcloud.com</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.4.14</version>
        <build-number>940014</build-number>
        <build-date>05-12-2023</build-date>
    </build-info>


<item>
            <title>[LU-12734] bash completion (for now: lctl set/get_param)</title>
                <link>https://jira.whamcloud.com/browse/LU-12734</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;Fairly far from lustre itself... Being used to tabbing into /proc/fs/lustre, with many files moving to various subdirectories of /sys the lctl set/get_param commands are really hard to use for me without completion.&lt;/p&gt;

&lt;p&gt;I wrote bash completion for the *_param commands only to start with, will push to gerrit what I have right away.&lt;/p&gt;

&lt;p&gt;Questions:&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;is there interest in general? If not, close this and will spare my time as well &lt;img class=&quot;emoticon&quot; src=&quot;https://jira.whamcloud.com/images/icons/emoticons/smile.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/li&gt;
	&lt;li&gt;can we land some partial completion (e.g. right now the first level of tab works with --list-commands, but beyond that you&apos;re on your own except for params commands), or do we want something complete-ish from the start?&lt;/li&gt;
	&lt;li&gt;if we start with lctl, what about lfs, lnetctl, etc etc etc...&lt;/li&gt;
	&lt;li&gt;if we start with bash, what about zsh, fish, etc...&lt;/li&gt;
	&lt;li&gt;should probably install to /usr/share/bash-completion/completions/&amp;lt;something&amp;gt;, but I&apos;m a bit lost as to where to add this bit.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;I personally don&apos;t care much - definitely won&apos;t help with other shell completions but I&apos;d be happy to (slowly) add up other commands and update once in a while; the most critical for me really is set/get_param completion and I&apos;ve set that up in our configuration management system so this is mostly freebies / possibly call for help to finish.&lt;/p&gt;</description>
                <environment></environment>
        <key id="56855">LU-12734</key>
            <summary>bash completion (for now: lctl set/get_param)</summary>
                <type id="2" iconUrl="https://jira.whamcloud.com/secure/viewavatar?size=xsmall&amp;avatarId=11311&amp;avatarType=issuetype">New Feature</type>
                                            <priority id="4" iconUrl="https://jira.whamcloud.com/images/icons/priorities/minor.svg">Minor</priority>
                        <status id="5" iconUrl="https://jira.whamcloud.com/images/icons/statuses/resolved.png" description="A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.">Resolved</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="1">Fixed</resolution>
                                        <assignee username="martinetd">Dominique Martinet</assignee>
                                    <reporter username="cealustre">CEA</reporter>
                        <labels>
                            <label>LTS12</label>
                    </labels>
                <created>Mon, 9 Sep 2019 14:45:14 +0000</created>
                <updated>Tue, 13 Dec 2022 18:01:03 +0000</updated>
                            <resolved>Fri, 20 Sep 2019 14:47:32 +0000</resolved>
                                                    <fixVersion>Lustre 2.13.0</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>9</watches>
                                                                            <comments>
                            <comment id="254385" author="gerrit" created="Mon, 9 Sep 2019 14:52:24 +0000"  >&lt;p&gt;Dominique Martinet (dominique.martinet@cea.fr) uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/36105&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/36105&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-12734&quot; title=&quot;bash completion (for now: lctl set/get_param)&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-12734&quot;&gt;&lt;del&gt;LU-12734&lt;/del&gt;&lt;/a&gt; misc: add bash completion for lctl set/get_param&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: 0e95b514a2ed0a0ddd4ca5b43858b6220a16f2fc&lt;/p&gt;</comment>
                            <comment id="254401" author="pjones" created="Mon, 9 Sep 2019 18:06:00 +0000"  >&lt;p&gt;There was enthusiastic response to this idea on the triage call today&lt;/p&gt;</comment>
                            <comment id="254407" author="adilger" created="Mon, 9 Sep 2019 18:29:54 +0000"  >&lt;p&gt;IMHO, I think your initial patch is already very useful and worthwhile to land. This is something that I&apos;ve wanted for a long time. &lt;/p&gt;

&lt;p&gt;I think implementing this incrementally is definitely the right way to do it. Trying to do a &quot;full&quot; implementation for all commands would take a lot of time and be of marginal use, since many lctl commands are rarely used. The get/set/list params have by far the most optional arguments, so users need the most help with those. Also, getting the initial functionality out to users could encourage contributions from others. &lt;/p&gt;

&lt;p&gt;Having bash completions for &quot;lfs setstripe&quot; would probably be my suggestion for the next thing to tackle. &lt;/p&gt;

&lt;p&gt;As for completions for other shells, I think that can be left for users who care more about them. Bash is by far the most common shell, and should get the most attention. &lt;/p&gt;</comment>
                            <comment id="255104" author="gerrit" created="Fri, 20 Sep 2019 07:55:11 +0000"  >&lt;p&gt;Oleg Drokin (green@whamcloud.com) merged in patch &lt;a href=&quot;https://review.whamcloud.com/36105/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/36105/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-12734&quot; title=&quot;bash completion (for now: lctl set/get_param)&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-12734&quot;&gt;&lt;del&gt;LU-12734&lt;/del&gt;&lt;/a&gt; misc: add bash completion for lctl set/get_param&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: f87a7f2656ceff174a00933a170032f093ecc72d&lt;/p&gt;</comment>
                            <comment id="255149" author="pjones" created="Fri, 20 Sep 2019 14:47:32 +0000"  >&lt;p&gt;Landed for 2.13&lt;/p&gt;</comment>
                            <comment id="256443" author="gerrit" created="Tue, 15 Oct 2019 23:18:28 +0000"  >&lt;p&gt;Andreas Dilger (adilger@whamcloud.com) uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/36459&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/36459&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-12734&quot; title=&quot;bash completion (for now: lctl set/get_param)&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-12734&quot;&gt;&lt;del&gt;LU-12734&lt;/del&gt;&lt;/a&gt; misc: allow older bash_completion versions&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: f40c0e4b7e7efaf6a1ed4cad23abbf2b70892872&lt;/p&gt;</comment>
                            <comment id="256444" author="adilger" created="Tue, 15 Oct 2019 23:22:53 +0000"  >&lt;p&gt;Dominique, I tried to install the &lt;tt&gt;lctl&lt;/tt&gt; bash completion on an older client (with &lt;tt&gt;bash-completion-1.3&lt;/tt&gt;), and it failed with an error &quot;&lt;tt&gt;bash _init_completion: command not found&lt;/tt&gt;&quot;.&#160; By looking at the existing helpers installed on that system, I found that replacing &lt;tt&gt;_init_completion&lt;/tt&gt; with &lt;tt&gt;_get_comp_words_by_ref&lt;/tt&gt; allowed the completions to work.&lt;/p&gt;

&lt;p&gt;It looks like the &quot;&lt;tt&gt;_get_comp_words_by_ref()&lt;/tt&gt;&quot; function is also available in newer versions of &lt;tt&gt;bash_completion&lt;/tt&gt; (at least &lt;tt&gt;bash-completion-2.1&lt;/tt&gt; uses it internally to &lt;tt&gt;_init_completions()&lt;/tt&gt;).  It seems to work in my light testing, but I don&apos;t know the details of what is being missed by not using &lt;tt&gt;_init_completions()&lt;/tt&gt;.  Do you know if that is critical?&lt;/p&gt;

&lt;p&gt;PS: this functionality is quite awesome.  It even works properly with things like &quot;&lt;tt&gt;osc.myth-&amp;#42;.max&amp;lt;tab&amp;gt;&lt;/tt&gt;&quot; to provide the &quot;short&quot; list of completions rather than expanding &quot;&lt;tt&gt;&amp;#42;&lt;/tt&gt;&quot; to the full list.&lt;/p&gt;</comment>
                            <comment id="256621" author="gerrit" created="Fri, 18 Oct 2019 02:23:22 +0000"  >&lt;p&gt;Minh Diep (mdiep@whamcloud.com) uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/36483&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/36483&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-12734&quot; title=&quot;bash completion (for now: lctl set/get_param)&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-12734&quot;&gt;&lt;del&gt;LU-12734&lt;/del&gt;&lt;/a&gt; misc: add bash completion for lctl set/get_param&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: b2_12&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: 21127722c3de7de0e2c7ea621e4b916cf820f66c&lt;/p&gt;</comment>
                            <comment id="257759" author="gerrit" created="Tue, 5 Nov 2019 18:32:11 +0000"  >&lt;p&gt;Andreas Dilger (adilger@whamcloud.com) merged in patch &lt;a href=&quot;https://review.whamcloud.com/36459/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/36459/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-12734&quot; title=&quot;bash completion (for now: lctl set/get_param)&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-12734&quot;&gt;&lt;del&gt;LU-12734&lt;/del&gt;&lt;/a&gt; misc: allow older bash_completion versions&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: 10578849c9a7cb1e1323fb98b270349651b5bf90&lt;/p&gt;</comment>
                            <comment id="258611" author="gerrit" created="Thu, 21 Nov 2019 07:34:10 +0000"  >&lt;p&gt;Oleg Drokin (green@whamcloud.com) merged in patch &lt;a href=&quot;https://review.whamcloud.com/36483/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/36483/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-12734&quot; title=&quot;bash completion (for now: lctl set/get_param)&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-12734&quot;&gt;&lt;del&gt;LU-12734&lt;/del&gt;&lt;/a&gt; misc: add bash completion for lctl set/get_param&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: b2_12&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: c2ae9aa442e79b0cb6e8853bc603148791034ca7&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="58033">LU-13225</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="73612">LU-16392</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                <customfield id="customfield_10890" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10390" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i00mf3:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10090" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                </customfields>
    </item>
</channel>
</rss>