From 0e9ddbb0bf0cd34500155ea4b03de2e2a38d8ab2 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Mon, 16 Mar 2020 23:33:42 +0100 Subject: Well I'm using Arch again --- .oh-my-zsh/lib/clipboard.zsh | 86 -------------------------------------------- 1 file changed, 86 deletions(-) delete mode 100644 .oh-my-zsh/lib/clipboard.zsh (limited to '.oh-my-zsh/lib/clipboard.zsh') diff --git a/.oh-my-zsh/lib/clipboard.zsh b/.oh-my-zsh/lib/clipboard.zsh deleted file mode 100644 index 2c93d1b..0000000 --- a/.oh-my-zsh/lib/clipboard.zsh +++ /dev/null @@ -1,86 +0,0 @@ -# System clipboard integration -# -# This file has support for doing system clipboard copy and paste operations -# from the command line in a generic cross-platform fashion. -# -# On OS X and Windows, the main system clipboard or "pasteboard" is used. On other -# Unix-like OSes, this considers the X Windows CLIPBOARD selection to be the -# "system clipboard", and the X Windows `xclip` command must be installed. - -# clipcopy - Copy data to clipboard -# -# Usage: -# -# | clipcopy - copies stdin to clipboard -# -# clipcopy - copies a file's contents to clipboard -# -function clipcopy() { - emulate -L zsh - local file=$1 - if [[ $OSTYPE == darwin* ]]; then - if [[ -z $file ]]; then - pbcopy - else - cat $file | pbcopy - fi - elif [[ $OSTYPE == cygwin* ]]; then - if [[ -z $file ]]; then - cat > /dev/clipboard - else - cat $file > /dev/clipboard - fi - else - if (( $+commands[xclip] )); then - if [[ -z $file ]]; then - xclip -in -selection clipboard - else - xclip -in -selection clipboard $file - fi - elif (( $+commands[xsel] )); then - if [[ -z $file ]]; then - xsel --clipboard --input - else - cat "$file" | xsel --clipboard --input - fi - else - print "clipcopy: Platform $OSTYPE not supported or xclip/xsel not installed" >&2 - return 1 - fi - fi -} - -# clippaste - "Paste" data from clipboard to stdout -# -# Usage: -# -# clippaste - writes clipboard's contents to stdout -# -# clippaste | - pastes contents and pipes it to another process -# -# clippaste > - paste contents to a file -# -# Examples: -# -# # Pipe to another process -# clippaste | grep foo -# -# # Paste to a file -# clippaste > file.txt -function clippaste() { - emulate -L zsh - if [[ $OSTYPE == darwin* ]]; then - pbpaste - elif [[ $OSTYPE == cygwin* ]]; then - cat /dev/clipboard - else - if (( $+commands[xclip] )); then - xclip -out -selection clipboard - elif (( $+commands[xsel] )); then - xsel --clipboard --output - else - print "clipcopy: Platform $OSTYPE not supported or xclip/xsel not installed" >&2 - return 1 - fi - fi -} -- cgit v1.2.3