andsens / homeshick

git dotfiles synchronizer written in bash
MIT License
2.11k stars 145 forks source link

Add plugin style initialization file for zsh #183

Closed FlorianFranzen closed 5 years ago

FlorianFranzen commented 6 years ago

This little file will allows zsh user to just source a single file to set up homeshick in their shell.

Furthermore you can now easily install homeshick as a plugin with a zsh plugin managers.

For example with zplug you can now add the following to your zshrc:

export HOMESHICK_DIR="$HOME/.zplug/repos/andsens/homeshick/"
zplug "andsens/homeshick"

Any feedback welcome.

andsens commented 6 years ago

I don't particularly like having a file with that name in the root when it is really only intended for zplug. How would you install this? It doesn't seem to follow the guide: https://github.com/zplug/zplug/blob/master/doc/guide/How-to-make-zsh-plugins.md

FlorianFranzen commented 6 years ago

The example you link is only for autoload plugins.

I used zplug only as an example and all I was hoping to do is allow zsh user to run homeshick with completion by sourcing only a single file.

FlorianFranzen commented 5 years ago

Now that there is a homeshick.csh and homeshick.fish in the root folder, maybe a similar file can be added for zsh as well.

andsens commented 5 years ago

homeshick.sh already does the job for zsh. I haven't had the time to think about this PR over the holidays. However, I can see the need for integrations to other tools.
Let me think about this a little while. Maybe we can add an integrations/ folder or something.

FlorianFranzen commented 5 years ago

After looking at the code again, it seems none of the shell specific initialization load any autocompletion, which is what I was suggesting for zsh with this pull-request. In that case homeshick.sh is indeed enough.

andsens commented 5 years ago

I have finally found the time to take a closer look at this. I'm not completely sure what you mean by your last comment. Regardless, I think a integrations/ folder is the way to go, let me know if the file in its current form would work for zplug.