Upload to a pastebin and display the URL in the status bar.
(self, s=None)
| 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.""" |
| 947 | |
| 948 | if s is None: |
| 949 | s = self.getstdout() |
| 950 | |
| 951 | if self.config.pastebin_confirm and not self.interact.confirm( |
| 952 | _("Pastebin buffer? (y/N) ") |
| 953 | ): |
| 954 | self.interact.notify(_("Pastebin aborted.")) |
| 955 | return None |
| 956 | else: |
| 957 | return self.do_pastebin(s) |
| 958 | |
| 959 | def do_pastebin(self, s) -> str | None: |
| 960 | """Actually perform the upload.""" |
nothing calls this directly
no test coverage detected