gmt icon indicating copy to clipboard operation
gmt copied to clipboard

Status of gmt_completion.bash

Open PaulWessel opened this issue 3 years ago • 3 comments

I believe @ldldr (Florian) wrote this script years ago. It seems badly out of sync with GMT now:

  • Lots of modules added to GMT since the script was introduced have not been added (e.g., batch, gmtbinstats, gmtregress, grd2kml, grdfill, grdgdal, grdinterpolate, grdmix, grdselect, psevents, pssolar, psternary, earthtide, gmtpmodeler, gpsgridder, gravprisms, mgd77header, originator, polespotter, pssac, rotsmoother, talwani2d, talwani3d).
  • While not checking, lots of other modules have received changes to options and hence the unique option list per module is out of sync as well.

Unlike the other share/tools scripts (which use gmt --show-classic etc to give correct list of modules) the gmt_completion.bash script is a 500+ line bash script with each module receiving special attention.

The fact we have had no user complain about missing modules or changed options suggest to me that this script is a very hidden and obscure gem with possibly no users and potentially lots of maintenance required to remain viable.

Rather than spend the time going through 150 modules to update the modopts arrays for each module and add the 23 missing modules, perhaps we can have a discussion of what to do. The options as I see them are

  1. Let it remain frozen in time but add a comment that this script was deprecated as of GMT 6.0 or thereabouts (probably 5.2.1 or so - will have to check).
  2. Put in the effort of adding the missing modules and checking each option array for changes, then add a task to check this script to our release check-list
  3. Remove it completely and direct anyone complaining to an earlier release.
  4. ???

Comments, @GenericMappingTools/core

PaulWessel avatar Jun 19 '22 09:06 PaulWessel

I could see the tab completion becoming more useful when long-options are implemented.

maxrjones avatar Jun 20 '22 16:06 maxrjones

Suggestion 4- Add a note that it is not actively maintained for now and put this issue as part of https://github.com/GenericMappingTools/gmt/projects/1 to see if we can come up with a solution that works for short and long options.

maxrjones avatar Jun 20 '22 16:06 maxrjones

There has to be a way to auto generate this..?

anbj avatar Aug 16 '22 18:08 anbj