Skip to content

Instantly share code, notes, and snippets.

@yaotti
Created March 12, 2010 15:08
Show Gist options
  • Save yaotti/330387 to your computer and use it in GitHub Desktop.
Save yaotti/330387 to your computer and use it in GitHub Desktop.
(defun copy-current-file-name ()
(interactive)
(let ((name (buffer-file-name)))
(shell-command (format "echo %s | pbcopy" name))
(message (format "copied: %s" name))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment