flatironinstitute / mountainlab-js

MountainLab is data processing, sharing and visualization software for scientists. It is built around MountainSort, spike sorting software, but is designed to be more generally applicable.
Other
43 stars 30 forks source link

bash_completion functions for mountainlab-js #46

Closed wysota closed 6 years ago

wysota commented 6 years ago

Bash completion for mountainlab-js tools. Allows to tab-complete commands.

This should go into ~/.bash_completion.d or system-wide /etc/bash_completion.d/.

Can be sourced manually from within .bashrc or .profile too.

magland commented 6 years ago

Awesome!

magland commented 6 years ago

We'll need to sync this with the actual functionality. How to do this going forward without manually tweaking the script?

wysota commented 6 years ago

If a tool behaves like a good citizen and responds to --help in a standard way then in most cases we won't have to do anything.

This is currently the case for: ml-prv-download ml-prv-locate ml-prv-sha1sum ml-prv-stat ml-exec-process.

For others it depends what kind of completion we want. Maybe we can come up with some kind of naming scheme to try and do most things automatically like bash itself does in many cases - e.g. assuming that if an option contains the word 'file' then we want to complete files.