summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.config/emacs/init.el8
1 files changed, 6 insertions, 2 deletions
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/[email protected]" "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