kutsan / zsh-system-clipboard

System clipboard key bindings for Zsh Line Editor with vi mode. It is similar to what `set clipboard=unnamed` does for vim.
GNU General Public License v3.0
149 stars 16 forks source link

add freebsd support #6

Closed ghost closed 6 years ago

kutsan commented 6 years ago

Thank you but I don't think we should repeat the existing code for nothing. We could have done that like this:

diff --git a/zsh-system-clipboard.zsh b/zsh-system-clipboard.zsh
--- a/zsh-system-clipboard.zsh
+++ b/zsh-system-clipboard.zsh
@@ -42,7 +42,7 @@ function _zsh_system_clipboard() {
                }
                ;;

-           linux*)
+           linux*|freebsd*)
                if (hash xclip 2>/dev/null) {
                    local clipboard_selection

If you can --force update the commit, I can merge it.

ghost commented 6 years ago

We need to at least change hash to whence then. hash doesn't appear to respect path on freebsd.

kutsan commented 6 years ago

@gregf Are you sure? Unlike whence, hash doesn't give you an output about the path. It just gives you an exit code, 0 or 1. I don't have a FreeBSD machine right now. Can you try editing the plugin file locally try using with hash?

ghost commented 6 years ago

You are right, not sure why I thought that the other day when I did this. Do you want me to resubmit or do you want to just add the |freebsd* yourself?

kutsan commented 6 years ago

Please don't open another pull request. If you can --force push it like I said above, I can merge it this PR.

kutsan commented 6 years ago

I mean commit again with --amend and push with --force.

kutsan commented 6 years ago

Thanks again! Much appericated it.