0854b18cdfa6b29b08848a23e79c3f214c5e0f8d

Author
Marko Bauhardt <marko.bauhardt@googlemail.com>
Committer
Marko Bauhardt <marko.bauhardt@googlemail.com>
Date

Message

a plugin (function) which copies the content of a file into the clipboard

Diff

 1diff --git a/plugins/copyfile/copyfile.plugin.zsh b/plugins/copyfile/copyfile.plugin.zsh
 2new file mode 100644
 3index 0000000000000000000000000000000000000000..944a903c644689d26e5918ea67a4a55f94736eda
 4--- /dev/null
 5+++ b/plugins/copyfile/copyfile.plugin.zsh
 6@@ -0,0 +1,5 @@
 7+function copyfile {
 8+  [[ "$#" != 1 ]] && return 1
 9+  local file_to_copy=$1
10+  cat $file_to_copy | pbcopy
11+}