cimon-io / ansible-role-asdf

57 stars 34 forks source link

Support for other shells (zsh, ...) #9

Closed makkus closed 5 years ago

makkus commented 5 years ago

Quick question: is there a reason for:

[ -n "$BASH_VERSION" ] || return 0

in the init file? This prevents loading of asdf when zsh is used. According to: https://github.com/asdf-vm/asdf/blob/master/README.md#setup zsh at least would also work when sourcing the asdf.sh file.

Might be neat to also support fish, seeing as asdf supports that too...

Should only be minor changes, but happy to send a pull request if you want.

merifri commented 5 years ago

Yes, there is a reason.

So this trick won't work:

[ -n "$BASH_VERSION" -o -n "$ZSH_VERSION" ]

I can add support for zsh/fish, but as a separate tasks. And I think it will look something like this:

Maybe you can offer a better solution?

makkus commented 5 years ago

Interesting, I wasn't aware of any of this.

In that case, I think you were right and it doesn't make too much sense to deal with that in this role. I reckon I can just add it to a $HOME/.profile or $HOME/.zshrc using an extra task, in cases where it's necessary. Thanks!

nullvariable commented 4 years ago

In case anyone lands here from search or looking for a solution for this, I use this role: https://github.com/gantsign/ansible-role-oh-my-zsh

To add the asdf plugin for zsh, which does autocomplete and all that jazz, works well in conjunction with this role