aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKutsan Kaplan <me@kutsankaplan.com>2017-10-28 21:34:58 +0300
committerKutsan Kaplan <me@kutsankaplan.com>2017-10-28 21:35:47 +0300
commitfd795399b5f4ec97b37e92babbdbf9f30ad1cf9b (patch)
treef4149cd124901ab0974e1e2d4a87f36ee9f6b6f4
parente0f5e9d0c004c6f5e88429328880c2c3c3aa2041 (diff)
downloadzsh-system-clipboard.zsh-0.2.1.tar.xz
zsh-system-clipboard.zsh-0.2.1.zip
Fix wrong control statementv0.2.1
-rw-r--r--zsh-system-clipboard.zsh8
1 files 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 <me@kutsankaplan.com>
# @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 {