diff options
author | Robby Russell <robby@planetargon.com> | 2013-04-23 19:59:51 -0700 |
---|---|---|
committer | Robby Russell <robby@planetargon.com> | 2013-04-23 19:59:51 -0700 |
commit | 1235b77effa13dbb12de7056f8c73f7f820c061b (patch) | |
tree | 415d12e8526ab537a297afd89d83af79c41a5400 /plugins/copyfile | |
parent | 42127bee6d80a86446c4961ebcc1a68cb2f14261 (diff) | |
parent | 0854b18cdfa6b29b08848a23e79c3f214c5e0f8d (diff) | |
download | zsh-1235b77effa13dbb12de7056f8c73f7f820c061b.tar.gz zsh-1235b77effa13dbb12de7056f8c73f7f820c061b.tar.bz2 zsh-1235b77effa13dbb12de7056f8c73f7f820c061b.zip |
Merge pull request #1702 from mbauhardt/copyfile
a plugin (function) which copies the content of a file into the clipboar...
Diffstat (limited to 'plugins/copyfile')
-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 +} |