Score:0

autocomplete-like feature in terminal (ROS2) that shows the "options" for that command typed in

ph flag

It's not quite autocomplete but on the ROS2 course on O'Reilly, the instructor types part of the command, presses Enter and the terminal shows any and all commands for which what has been typed before pressing Enter is a substring of the actual command.

Here is an example

autocomplete pic

cd /usr/share/col

gets him several that start like that and among them he chooses to type in

cd /usr/share/colcon_argcomplete...

... because he types in the subdirectory after that

How do I get this functionality on my terminal?

Marco avatar
br flag
Usally `TAB` `TAB` shows the different possibilities for autocomplete.
mLstudent33 avatar
ph flag
```yck33@nyck33-VB-Ubu22ROS:~/ros2_ws$ history | g Display all 242 possibilities? (y or n) ``` that does not really work. @Marco
Score:0
ph flag

It's press TAB twice in quick succession, in my use case in the ROS2 course, I type

ros2 run my_py_pkg //tab twice now

giving me a list of executables that I can run with that command

nyck33@nyck33-VB-Ubu22ROS:~$ ros2 run my_py_pkg 

--prefix

py_node

robot_news_station

//then run the command I want

nyck33@nyck33-VB-Ubu22ROS:~$ ros2 run my_py_pkg robot_news_station


mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.