improve fez/ttm-upload

This commit is contained in:
opfez 2021-07-18 14:59:02 +02:00
parent 8d00eda928
commit a27f3af5ae
1 changed files with 5 additions and 3 deletions

View File

@ -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."