<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>CLI autocomplete</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/22261/cli-autocomplete</link><description>Hey. Has anybody played with autocomplete for command line interface.
I like it alot and it is very helpfull. Now a autocomplete would be cool! 
 Here is what comes to mind: 
 
 
 key as arrows and tab should be treated as return with the same text</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 03 Aug 2017 13:27:17 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/22261/cli-autocomplete" /><item><title>RE: CLI autocomplete</title><link>https://devzone.nordicsemi.com/thread/87501?ContentTypeID=1</link><pubDate>Thu, 03 Aug 2017 13:27:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:19bd96a3-3bd6-48cf-886a-b3e0b786e741</guid><dc:creator>schef</dc:creator><description>&lt;p&gt;Very good :)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CLI autocomplete</title><link>https://devzone.nordicsemi.com/thread/87500?ContentTypeID=1</link><pubDate>Thu, 03 Aug 2017 13:25:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d7ad2d05-dff7-4492-b540-cedcbf8c3331</guid><dc:creator>Jakub Rzeszutko</dc:creator><description>&lt;p&gt;First blog post is available here :)&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/blogs/1150/new-command-line-interface-part-1/"&gt;devzone.nordicsemi.com/.../&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CLI autocomplete</title><link>https://devzone.nordicsemi.com/thread/87494?ContentTypeID=1</link><pubDate>Thu, 03 Aug 2017 11:11:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:16e24ebb-eadb-4b10-b366-e6a7fabcb31b</guid><dc:creator>Jakub Rzeszutko</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;New CLI is available with released (today) SDK14.&lt;/p&gt;
&lt;p&gt;I encourage you to try few examples like: cli, ble_app_cli and few others&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CLI autocomplete</title><link>https://devzone.nordicsemi.com/thread/87493?ContentTypeID=1</link><pubDate>Wed, 24 May 2017 08:45:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:418783b6-c32d-4faa-a691-bbef42953095</guid><dc:creator>Jakub Rzeszutko</dc:creator><description>&lt;p&gt;Please be patient ;)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CLI autocomplete</title><link>https://devzone.nordicsemi.com/thread/87492?ContentTypeID=1</link><pubDate>Wed, 24 May 2017 08:39:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9910451e-1a54-46d4-a51b-5398d3cdb998</guid><dc:creator>schef</dc:creator><description>&lt;p&gt;Cool! I&amp;#39;m very excited :) is there any beta testing? :D&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CLI autocomplete</title><link>https://devzone.nordicsemi.com/thread/87491?ContentTypeID=1</link><pubDate>Wed, 24 May 2017 07:38:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:70d5439a-2611-440d-bfe8-c9ad1a25bea7</guid><dc:creator>Jakub Rzeszutko</dc:creator><description>&lt;p&gt;User will have two macro types: one for creating &amp;quot;root command&amp;quot; and other for creating subcommands. We plan to ensure backward compatibility so either root command can have a handler as it is now or sub commands can have it. Console will execute deepest handler which will be found.&lt;/p&gt;
&lt;p&gt;As an example you can have command: &amp;quot;&lt;strong&gt;log enable SPI&lt;/strong&gt;&amp;quot; where:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;log (root command): can have handler or not&lt;/li&gt;
&lt;li&gt;enable (sub command of log): can have handler or not&lt;/li&gt;
&lt;li&gt;SPI (sub command of enable): can have handler or not.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;So you can either implement very complex handler for &amp;quot;log&amp;quot; to detect &amp;quot;enable&amp;quot; and next &amp;quot;SPI&amp;quot; or less complex handler for &amp;quot;enable&amp;quot; to detect &amp;quot;SPI&amp;quot; or you can implement only a simple handler for &amp;quot;SPI&amp;quot;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CLI autocomplete</title><link>https://devzone.nordicsemi.com/thread/87490?ContentTypeID=1</link><pubDate>Wed, 24 May 2017 07:16:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c7f6b60d-f5cb-46d5-9938-e63107a3d626</guid><dc:creator>schef</dc:creator><description>&lt;p&gt;What is recomended way of writing commands so it will be compatible in the future. I mean about the depth autocomplete?&lt;/p&gt;
&lt;p&gt;Now i have alot of &lt;code&gt;if/else if/else&lt;/code&gt; which is not very readable.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CLI autocomplete</title><link>https://devzone.nordicsemi.com/thread/87499?ContentTypeID=1</link><pubDate>Tue, 23 May 2017 12:10:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b4792a3f-3373-4c2a-bad5-ef45c3fe0672</guid><dc:creator>Jakub Rzeszutko</dc:creator><description>&lt;p&gt;I promise there will be a blog regarding new features but not before release of new console. I am also quite sure that you will like what we prepared :)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CLI autocomplete</title><link>https://devzone.nordicsemi.com/thread/87498?ContentTypeID=1</link><pubDate>Tue, 23 May 2017 11:24:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5b87095b-6b28-4584-8f5a-6c5f85a91649</guid><dc:creator>schef</dc:creator><description>&lt;p&gt;A thread is already a good start!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CLI autocomplete</title><link>https://devzone.nordicsemi.com/thread/87497?ContentTypeID=1</link><pubDate>Tue, 23 May 2017 11:23:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d7a9712b-376b-4d71-81fe-7cc5c1d462e4</guid><dc:creator>Jakub Rzeszutko</dc:creator><description>&lt;p&gt;Hi endnode,
I will try but we are very short on time :(&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CLI autocomplete</title><link>https://devzone.nordicsemi.com/thread/87510?ContentTypeID=1</link><pubDate>Tue, 23 May 2017 11:15:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:45aa1c62-9ee7-48a0-9e80-c3ae7e8a8daf</guid><dc:creator>schef</dc:creator><description>&lt;p&gt;In putty it works great! Thanks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CLI autocomplete</title><link>https://devzone.nordicsemi.com/thread/87496?ContentTypeID=1</link><pubDate>Tue, 23 May 2017 11:10:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1e3aa0c5-9ac0-4795-9548-6316a64474c4</guid><dc:creator>endnode</dc:creator><description>&lt;p&gt;(Hi Jakub, this almost screams like &amp;quot;write a blog post about me!&amp;quot;:)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CLI autocomplete</title><link>https://devzone.nordicsemi.com/thread/87509?ContentTypeID=1</link><pubDate>Tue, 23 May 2017 10:55:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:798e9827-650a-40d1-a577-0c4dad55eb22</guid><dc:creator>Jakub Rzeszutko</dc:creator><description>&lt;p&gt;Hi,
Regarding first concern. Pressing &amp;quot;up&amp;quot; shall print in command line historical command starting from last entered. If command &amp;quot;history&amp;quot; is showing for example:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;[  0] cmd_0&lt;/li&gt;
&lt;li&gt;[  1] cmd_1&lt;/li&gt;
&lt;li&gt;[  2] cmd_2&lt;/li&gt;
&lt;li&gt;[  3] cmd_3&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;than by pressing &amp;quot;up&amp;quot; you will see cmd_3, &amp;quot;up&amp;quot; again and you will see cmd_2 and so on...
But in the example you can observe following bug: if you have commands from [  0] to [  7] and if you will press &amp;quot;up&amp;quot; as many times to see what was cmd [  0] than CLI will be blocked until .&lt;/p&gt;
&lt;p&gt;After pressing  copletion shall be done automatically without any additional .
If you need to press enter to see completion results it means that your terminal is not correctly configured. I will try to paste my putty settings here.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CLI autocomplete</title><link>https://devzone.nordicsemi.com/thread/87508?ContentTypeID=1</link><pubDate>Tue, 23 May 2017 10:15:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fce97af4-5047-4456-ad3a-9402f50f824c</guid><dc:creator>schef</dc:creator><description>&lt;p&gt;I have just tried out what would happend if i pressed two times  and press .
It did use the two commands back in history. Is this normal behavior? Should i always press enter also after pressing ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CLI autocomplete</title><link>https://devzone.nordicsemi.com/thread/87507?ContentTypeID=1</link><pubDate>Tue, 23 May 2017 10:03:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a56fcf70-55d9-4e05-a26f-8d9c285589c4</guid><dc:creator>Jakub Rzeszutko</dc:creator><description>&lt;p&gt;So it will be easy from here to make it working as you expect :)
My recommendation is to do following in case of RTT:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;open connection using JLink.exe (not JLink viewer!)&lt;/li&gt;
&lt;li&gt;as terminal please use Putty. It is the only terminal I found which can be easly configured to handle VT100 escape codes. Mandatory Putty configuration:&lt;/li&gt;
&lt;li&gt;inside Terminal-&amp;gt;Line discipline options-&amp;gt; Local echo and local line editiong set to: &amp;quot;Force off&amp;quot;&lt;/li&gt;
&lt;li&gt;Terminal-&amp;gt;Keybord: you shall have set: Control-H, rxvt, SCO, Normal, Normal&lt;/li&gt;
&lt;/ul&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CLI autocomplete</title><link>https://devzone.nordicsemi.com/thread/87506?ContentTypeID=1</link><pubDate>Tue, 23 May 2017 09:54:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fe0cf37f-0d81-4a86-a27c-f0086efe4c42</guid><dc:creator>schef</dc:creator><description>&lt;p&gt;I&amp;#39;m using RTT. I&amp;#39;m on &lt;code&gt;linux&lt;/code&gt; and am using &lt;code&gt;SEGGER J-Link Commander V6.12e&lt;/code&gt; for connection to J-Link and &lt;code&gt;telnet localhost 19021&lt;/code&gt; for communication.&lt;/p&gt;
&lt;p&gt;Executing history command works.
But on arrow keys i get:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;nrf_cli:~$ ^[[A^[[A^[[B^[[A^[[B^[[A&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Maybe this has to do with telnet.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CLI autocomplete</title><link>https://devzone.nordicsemi.com/thread/87505?ContentTypeID=1</link><pubDate>Tue, 23 May 2017 09:50:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:092fe3bb-3c0f-40ba-957a-6e6411b0e09c</guid><dc:creator>Jakub Rzeszutko</dc:creator><description>&lt;p&gt;What do you mean not working? When I am flashing this hex to my board I am able to:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Execute command: &amp;quot;history&amp;quot;&lt;/li&gt;
&lt;li&gt;Use up and down arrow to go through history list*&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
&lt;li&gt;Unofrtunately in this version is small bug in the code. If history list is full [0-7] and when you will press up arror until you will see history cmd [0], console will be blocked until you will press enter. This will be fixed with new CLI release.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;What interface are you using? UART, USB or RTT?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CLI autocomplete</title><link>https://devzone.nordicsemi.com/thread/87504?ContentTypeID=1</link><pubDate>Tue, 23 May 2017 09:45:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:79595a47-d136-4f93-b7ed-865907b18af5</guid><dc:creator>schef</dc:creator><description>&lt;p&gt;I am using this one. But the history is not working there.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CLI autocomplete</title><link>https://devzone.nordicsemi.com/thread/87503?ContentTypeID=1</link><pubDate>Tue, 23 May 2017 09:14:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:65180807-55bf-465c-95ec-cd54d3139917</guid><dc:creator>Jakub Rzeszutko</dc:creator><description>&lt;p&gt;Hi,
Example is available here:
\examples\peripheral\cli\&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CLI autocomplete</title><link>https://devzone.nordicsemi.com/thread/87502?ContentTypeID=1</link><pubDate>Tue, 23 May 2017 08:57:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2ab78634-5484-4c41-871d-7feb8eae7f57</guid><dc:creator>schef</dc:creator><description>&lt;p&gt;This is very good news. :)
You said that  and history is already implemented. Is there a example or can u share how to use them already?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CLI autocomplete</title><link>https://devzone.nordicsemi.com/thread/87495?ContentTypeID=1</link><pubDate>Tue, 23 May 2017 08:45:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0a451ccd-e3ba-46ab-832b-7350c579320b</guid><dc:creator>Jakub Rzeszutko</dc:creator><description>&lt;p&gt;Hello schef,
Command line interface which is in SDK13 already have some of these features.
Tab button provides completition of existing commands, up and down arrows allows you to go through history.&lt;/p&gt;
&lt;p&gt;We are currently working to introduce more advanced console application and we will try to add it with next SDK release.
New features which you can expect:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;handling left and right arrows,&lt;/li&gt;
&lt;li&gt;handling home, end, insert button,&lt;/li&gt;
&lt;li&gt;multi level commands with smart completion of each level,&lt;/li&gt;
&lt;li&gt;optimized memory usage,&lt;/li&gt;
&lt;li&gt;cooperation with log module - console will be able to display logs and introduce new commands in parallel,&lt;/li&gt;
&lt;li&gt;user will have possibility to dynamically enable and disable logs&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Basically we want to provide really user friendly CLI.&lt;/p&gt;
&lt;p&gt;Recommended Putty settings for RTT connection:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/putty0.PNG" alt="image description" /&gt;&lt;img src="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/putty1.PNG" alt="image description" /&gt;&lt;img src="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/putty2.PNG" alt="image description" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CLI autocomplete</title><link>https://devzone.nordicsemi.com/thread/87489?ContentTypeID=1</link><pubDate>Tue, 23 May 2017 08:27:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c4b24455-2893-4739-9ee0-edc9c599ffad</guid><dc:creator>endnode</dc:creator><description>&lt;p&gt;What command line interface are you talking about?:)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>