Skip to content

-? fails when using ZSH #5395

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

Closed
KristofKoch opened this issue Jun 27, 2021 · 2 comments
Closed

-? fails when using ZSH #5395

KristofKoch opened this issue Jun 27, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@KristofKoch
Copy link
Contributor

Description of the problem
When using the ZSH shell the -? argument doesn't work. Generally not a problem as no argument has the same behavior. It becomes a problem at least with begin and end where no argument is required for proper operation. As ZSH is the new default shell for MacOS this might become more of an issue.

Full script that generated the error

> gmt coast -?
zsh: no matches found: -?
>

Actual outcome

Nothing but an error message

Expected outcome

Full usage message for coast.

System information

  • Operating system: Manjaro Linux
  • GMT version (gmt --version): 6.3.0_b89cf1d_2021.06.26
@KristofKoch KristofKoch added the bug Something isn't working label Jun 27, 2021
@seisman
Copy link
Member

seisman commented Jun 27, 2021

We have the same issue with csh (#3916), but I think nothing we can do on the GMT side.

For zsh, ohmyzsh/ohmyzsh#31 provides two workarounds.

  1. Add noglob before commands, i.e., noglob gmt coast -?
  2. Add unsetopt nomatch in .zshrc

@seisman
Copy link
Member

seisman commented Feb 21, 2022

I'm closing the issue because GMT can do nothing here. Feel free to reopen the issue if you think more discussions are needed.

@seisman seisman closed this as completed Feb 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants