summaryrefslogtreecommitdiff
path: root/.config/emacs/init.el
diff options
context:
space:
mode:
authorThanos Apollo <[email protected]>2024-06-25 01:18:10 +0300
committerThanos Apollo <[email protected]>2024-06-25 01:18:10 +0300
commit50ad0ba1ea73f68ead8db9f97614e10f5a72f699 (patch)
tree7ce987cc6508aee4ad040a2eff4944a075b7eb0e /.config/emacs/init.el
parent3418734cc5299226fdbd6fd507dad74187319b82 (diff)
emacs: Update 0x0-upload
Diffstat (limited to '.config/emacs/init.el')
-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