I'm a happy oh-my-zsh user. One of the plugins I really like is the per-directory-history plugin, which keeps track of shell history on a per-directory basis.
It seems like there is some conflict between this plugin and sdkman; as soon as I install sdkman I start getting messages like this after most commands that I run in the shell (even if the commands in question are not related to sdkman):
_per-directory-history-addhistory:print:1: option -S takes a single argument
And then those commands don't end up in my shell history. Any ideas?
Sounds like it might be an issue with the plugin. Remember that the sdk command is not a file on the path, but a function loaded on shell initialisation. Other than invoking that function, we do nothing out of the ordinary in the shell.
BTW, we are fully compatible with ZSH and ohmyzsh, so that can't be the problem.
It has something to do with what gets sourced in zshrc by the two tools. They conflict in some way. When I have both of them enabled in my zshrc, I get the error above from many commands that have nothing to do with sdkman, e.g. vim.