sdkman / sdkman-cli

The SDKMAN! Command Line Interface
https://sdkman.io
Apache License 2.0
6.07k stars 628 forks source link

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

Open cprice404 opened 8 years ago

cprice404 commented 8 years ago

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 commented 7 years ago

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 commented 7 years ago

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.