From fd795399b5f4ec97b37e92babbdbf9f30ad1cf9b Mon Sep 17 00:00:00 2001 From: Kutsan Kaplan Date: Sat, 28 Oct 2017 21:34:58 +0300 Subject: Fix wrong control statement --- zsh-system-clipboard.zsh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/zsh-system-clipboard.zsh b/zsh-system-clipboard.zsh index b913448..6cc23d9 100644 --- a/zsh-system-clipboard.zsh +++ b/zsh-system-clipboard.zsh @@ -3,7 +3,7 @@ # # @author Kutsan Kaplan # @license GPLv3 -# @version v0.1.0 +# @version v0.2.1 ## function _zsh_system_clipboard_api() { @@ -22,7 +22,7 @@ function _zsh_system_clipboard_api() { function determinate_clipboard_manager() { case "$OSTYPE" { darwin*) - if (hash pbcopy 2>/dev/null && hash pbpaste 2>/dev/null) { + if ((hash pbcopy && hash pbpaste) 2>/dev/null) { typeset -g CLIPBOARD[set]='pbcopy' typeset -g CLIPBOARD[get]='pbpaste' } else { @@ -31,7 +31,7 @@ function _zsh_system_clipboard_api() { ;; linux-android*) - if (hash termux-clipboard-set 2>/dev/null && hash termux-clipboard-get 2>/dev/null) { + if ((hash termux-clipboard-set && hash termux-clipboard-get) 2>/dev/null) { typeset -g CLIPBOARD[set]='termux-clipboard-set' typeset -g CLIPBOARD[get]='termux-clipboard-get' } else { @@ -40,7 +40,7 @@ function _zsh_system_clipboard_api() { ;; linux*) - if (hash xsel 2>/dev/null) { + if (hash xclip 2>/dev/null) { typeset -g CLIPBOARD[set]='xclip -in' typeset -g CLIPBOARD[get]='xclip -out' } else { -- cgit v1.2.1