From 50ad0ba1ea73f68ead8db9f97614e10f5a72f699 Mon Sep 17 00:00:00 2001 From: Thanos Apollo Date: Tue, 25 Jun 2024 01:18:10 +0300 Subject: emacs: Update 0x0-upload --- .config/emacs/init.el | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to '.config') diff --git a/.config/emacs/init.el b/.config/emacs/init.el index d827c23..49831a1 100644 --- a/.config/emacs/init.el +++ b/.config/emacs/init.el @@ -1377,9 +1377,13 @@ Create a temporary frame to execute BODY, which will then be deleted." (password-store-copy-field "fastmail.com/thanosapollo@fastmail.com" "smtp")) (defun thanos/0x0-upload (&optional file) - "Upload FILE to 0x0.st" + "Upload FILE, in current directory, to 0x0.st." (interactive) - (let ((file (or file (dired-get-filename)))) + (let ((file (or file (completing-read + "Choose a file: " + (seq-filter + (lambda (file) (not (string-prefix-p "." file))) + (directory-files default-directory)))))) (async-shell-command (format "curl -F'file=@%s' https://0x0.st" file)))) ;;; init.el ends here -- cgit v1.2.3