This project provides bash auto-complete suggestions for sst-info, which is a part of the SST Simulator. As SST-Elements provides so many components, it can be difficult to parse through what is available. This command should make it easier to explore your installed components!
Hopefully, this will be integrated into sst-core. Please open an issue if you have suggestions for how to improve this script or if you think some other sst command needs completions.
You simply need to source the sst-info-completions.bash file. It will run sst-info to get a list of elements and components. If you add more components, you should re-run this script.
Add the following line to your .bashrc, after sst-info is available.
source ~/sst-completion/sst-info-completion.bash
This tool provides suggestions for sst-info arguments in 2 steps:
- It will first try to guess which element you want. As long as there is no period in the argument, this is what the tool thinks you want to do. For example, typing the letter
mwill bring up elements starting withm.
$ sst-info m<TAB><TAB>
memHierarchy merlin miranda
- If you continue to hit tab, you will be prompted with the names of components and subcomponents in that element.
$ sst-info miranda.R<TAB><TAB>
miranda.RandomGenerator miranda.ReverseSingleStreamGenerator
-
Integrate this into the sst-core installation script, and make sure it is updated when new elements are added either through the sst-elements installation or sst-register. At the same time, make this script more robust by generating the elements and components names.
-
Figure out how to properly install this, either in
~/.bash_completionor in whatever this guide says.
I used Lazarus Lazaridis's guide to create this script. There are some good link at the end of his post.