From 5c8b0cc0c1782b34790548498018fb9e0300992b Mon Sep 17 00:00:00 2001 From: Andrew Janke Date: Mon, 17 Aug 2015 22:53:45 -0400 Subject: Add clipcopy() and clippaste() generic cross-platform CLI clipboard functions. Change copydir, copyfile, and coffee plugins to use them, instead of the Mac-only `pbcopy` command. --- plugins/copydir/copydir.plugin.zsh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'plugins/copydir') diff --git a/plugins/copydir/copydir.plugin.zsh b/plugins/copydir/copydir.plugin.zsh index 37bb5e086..4b918e815 100644 --- a/plugins/copydir/copydir.plugin.zsh +++ b/plugins/copydir/copydir.plugin.zsh @@ -1,3 +1,5 @@ +# Copies the pathname of the current directory to the system or X Windows clipboard function copydir { - pwd | tr -d "\r\n" | pbcopy + emulate -L zsh + print -n $PWD | clipcopy } \ No newline at end of file -- cgit v1.2.3-70-g09d2