supercrabtree / k

k is the new l, yo
1.78k stars 123 forks source link

Adjust plugin.zsh file to run on zsh 5.1 in mSYS2 #68

Closed adamkruszewski closed 1 year ago

adamkruszewski commented 8 years ago

mSYS2 on Windows doesn't support symlinks so I have changed the plugin.zsh to be a normal file for it to work. Probably noone apart of me uses 'k' on windows but it works great after this one little change.

supercrabtree commented 8 years ago

Hey thanks for this, will test as soon as I can. I seem to have a lot of trouble with these "edge case pull requests". Normally they end up breaking someone else's setup somewhere else, not really sure what to do about this, zsh is near on impossible to test.

adamkruszewski commented 8 years ago

I know what you mean :) I have added exactly the same change to three other zsh plugins. You can check them out here: https://github.com/zsh-users/zsh-autosuggestions/pull/156 https://github.com/mgee/slimline/pull/2 https://github.com/zsh-users/zsh-syntax-highlighting/pull/292

I have based the change on what I saw in other plugins that worked out of the box and then it was tweaked additionally by zsh-users/zsh-syntax-higlighting guys. All it does it changes the symlink into a regular file that sources the plugin main script file (msys2 on windows doesn't support symlinks; at least if you don't want to run it always as Administrator). Should be harmless at lest in theory ;-)

Would be great to see it in your repo, but I also think it is better to be safe than sorry. I'm probably a sole ZSH on windows user so I can continue to pull the plugin from my own fork ;)