diff options
author | Marko Bauhardt <marko.bauhardt@googlemail.com> | 2013-04-08 22:32:00 +0200 |
---|---|---|
committer | Marko Bauhardt <marko.bauhardt@googlemail.com> | 2013-04-08 22:32:00 +0200 |
commit | 0854b18cdfa6b29b08848a23e79c3f214c5e0f8d (patch) | |
tree | 27425c1268b270592f5636f5ad17f4ff5eb7b693 /plugins | |
parent | 0198a12953ab92f5cc07ae464c34e3e37ab34d33 (diff) | |
download | zsh-0854b18cdfa6b29b08848a23e79c3f214c5e0f8d.tar.gz zsh-0854b18cdfa6b29b08848a23e79c3f214c5e0f8d.tar.bz2 zsh-0854b18cdfa6b29b08848a23e79c3f214c5e0f8d.zip |
a plugin (function) which copies the content of a file into the clipboard
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/copyfile/copyfile.plugin.zsh | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/plugins/copyfile/copyfile.plugin.zsh b/plugins/copyfile/copyfile.plugin.zsh new file mode 100644 index 000000000..944a903c6 --- /dev/null +++ b/plugins/copyfile/copyfile.plugin.zsh @@ -0,0 +1,5 @@ +function copyfile { + [[ "$#" != 1 ]] && return 1 + local file_to_copy=$1 + cat $file_to_copy | pbcopy +} |