1. Preface¶
While GMT has served the map-making and data processing needs of scientists since 1988 [1], the current global use was heralded by the first official release in EOS Trans. AGU in the fall of 1991. Since then, GMT has grown to become a standard tool for many users, particularly in the Earth and Ocean Sciences but the global collective of GMT users is incredibly diverse. Development has at times been rapid, and numerous releases have seen the light of day since the early versions. For a detailed history of the changes from release to release, see Changelog. For a nightly snapshot of ongoing activity, see the GMT repository on GitHub. For a historical perspective of the origins and development of GMT, see the video podcast “20 Years with GMT – The Generic Mapping Tools” produced following a seminar given by Paul Wessel on the 20th anniversary of GMT.
The success of GMT is to a large degree due to the input of the user community. In fact, most of the capabilities and options in the GMT modules originated as user requests. We would like to hear from you should you have any suggestions for future enhancements and modification. Please submit a bug report or a feature request on GitHub (https://github.com/GenericMappingTools/gmt/issues).
1.1. Command-line completion¶
GMT provides basic command-line completion (tab completion) for bash. The easiest way to use the feature is to install the bash-completion package which is available in many operating system distributions.
Depending on the distribution, you may still need to source it from
~/.bashrc
, e.g.:
# Use bash-completion, if available
if [ -r /usr/share/bash-completion/bash_completion ]; then
. /usr/share/bash-completion/bash_completion
fi
When you install GMT from a distribution package, the completion rules
are installed in /etc/bash_completion.d/gmt
and loaded automatically.
Custom GMT builds provide <prefix>/share/tools/gmt_completion.bash
which needs to be manually sourced from either ~/.bash_completion
or
~/.bashrc
.
Mac users should note that bash-completion >=2.0 requires bash >=4.1. However, macOS won’t ship anything that’s licensed under GPL version 3. The last version of bash available under the GPLv2 is 3.2 from 2006. It is recommended that bash-completion is installed together with bash via MacPorts, Fink, or Homebrew. You then need to change the shell used by your terminal application. The bash-completion HOWTO from MacPorts explains how to change the preferences of Terminal.app and iTerm.app. Another way is to change the default shell by editing of the user database:
Add /opt/local/bin/bash to /etc/shells
chsh -s /opt/local/bin/bash
Modify the path to bash, /opt/local/bin/bash
, in the example above
accordingly.