sdkman init script appears to conflict with oh-my-zsh 'per-directory-history' plugin #474

Open
cprice404 opened this Issue Sep 20, 2016 · 2 comments

Projects

None yet

2 participants

@cprice404

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?

@marc0der
Member

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.

@cprice404

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment