Hugo modules with `-h` in the name not working

I have a theme that I am trying to move to modules. It is currently hosted at

When I use hugo mod get or hugo mod get "" I am getting the output as if I am typing hugo mod get -h
How do we pass dashes to the Hugo command line? I am on MacOS using zsh.

It works if I use hugo mod get

Looks like you should open an issue for that on Github. That’s definitely a bug not a wanted behaviour.

Did you try a backslash before the dash? like hugo mod get\-hugo\-theme ? In linux systems the backslash tends to make the following character literal.


That is an odd issue, but I guess hugo mod get is a little special as we just transfer the flags to Go.

That said, the only time I think you’d want to run hugo mod get is when you want to update to never versions of a module. And then you’d typically do hugo mod get -u go update all or hugo mod get -u some-mod to update one. If you just add a new module to config.toml Hugo will “auto get” it.

That said, I’ll fix the reported issue.