From a27f3af5ae54a84e822403f7b1b73b6085bdc411 Mon Sep 17 00:00:00 2001 From: opfez Date: Sun, 18 Jul 2021 14:59:02 +0200 Subject: [PATCH] improve fez/ttm-upload --- custom.el | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/custom.el b/custom.el index bd10fc6..c294359 100644 --- a/custom.el +++ b/custom.el @@ -94,9 +94,11 @@ (defun fez/ttm-upload () "Upload file in selected buffer to ttm.sh and output the link in the echo area (and in *Messages*)" (interactive) - (message "%s" (shell-command-to-string (concat "curl -Ffile=@" - (buffer-file-name) - " https://ttm.sh")))) + (let ((link (shell-command-to-string (concat "curl -Ffile=@" + (buffer-file-name) + " https://ttm.sh -s")))) + (message "%s" link) + (kill-new link))) (defun fez/last-occurrence-of-char (c) "Go to the previous occurrence of C in the current buffer."