Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bash completion: return progs as an array #397

Merged
merged 1 commit into from
Feb 5, 2019

Conversation

mrajner
Copy link
Contributor

@mrajner mrajner commented Feb 5, 2019

Description of proposed changes

to get options completion the progs variable needs to be of array type.

Now

gmt <tab><tab>

complete the list of modules, but for example (name any module)

gmt pscoast -<tab><tab>

does not provide completion of possible switches.

Embracing assignment of gmt modules in parenthesis resolves this issue.

@PaulWessel PaulWessel self-requested a review February 5, 2019 21:06
@PaulWessel PaulWessel merged commit b0a79ec into GenericMappingTools:master Feb 5, 2019
@mrajner mrajner deleted the bashcompletion branch February 5, 2019 23:44
obaney pushed a commit to obaney/gmt that referenced this pull request Aug 18, 2021
….0 (GenericMappingTools#397)

PyGMT fails with the latest GMT master branch with the following error message:
```
GMTCLibError: Constant 'GMT_STR16' doesn't exits in libgmt.
```

To reproduce the issue, you can run:
```
import pygmt
fig = pygmt.Figure()
fig.basemap(region='0/10/0/10', projection='X10c', frame=True)
fig.plot(x=5, y=5, style='c0.2c')
```

The error is caused by the recent change of the length of virtual file names
from `GMT_STR16` to `GMT_VF_LEN` in the core GMT
(see GenericMappingTools#2861).

Changing `GMT_STR16` to `GMT_VF_LEN` is the easiest fix.
To keep compatibility with both GMT 6.0.0 and the upcomming 6.1.0,
this PR checks GMT version and use `GMT_STR16` for 6.0.0, otherwise
use `GMT_VF_LEN`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants