Copy current content to clipboard.
(self)
| 928 | self.interact.notify(_("Saved to %s.") % (path,)) |
| 929 | |
| 930 | def copy2clipboard(self) -> None: |
| 931 | """Copy current content to clipboard.""" |
| 932 | |
| 933 | if not have_pyperclip: |
| 934 | self.interact.notify(_("No clipboard available.")) |
| 935 | return |
| 936 | |
| 937 | content = self.get_session_formatted_for_file() |
| 938 | try: |
| 939 | pyperclip.copy(content) |
| 940 | except pyperclip.PyperclipException: |
| 941 | self.interact.notify(_("Could not copy to clipboard.")) |
| 942 | else: |
| 943 | self.interact.notify(_("Copied content to clipboard.")) |
| 944 | |
| 945 | def pastebin(self, s=None) -> str | None: |
| 946 | """Upload to a pastebin and display the URL in the status bar.""" |
nothing calls this directly
no test coverage detected