index all rss mastodon twitter github linkedin email
Álvaro Ramírez

Álvaro Ramírez

11 May 2023 dwim-shell-command on Windows + upload to

You can now use dwim-shell-command on Windows. Shoutout to Kartik Saranathan, who sent a pull request to get rid of ls usage.

Also thanks to Bram for sharing his upload to implementation. I'd been wanting to do something similar for imgur, but is a much better alternative!


dwim-shell-commands-upload-to-0x0 is now part of dwim-shell-commands.el (the optional part of the package). It has to additional touches:

  • Open the uploaded image in eww browser.
  • Automatically copy the upload URL to kill-ring, after all you're likely gonna share this link, right?

If you're unfamiliar with dwim-shell-command, it enables Emacs shell commands with DWIM behaviour:

  • Asynchronously.
  • Using noweb templates.
  • Automatically injecting files (from dired or other buffers) or kill ring.
  • Managing buffer focus with heuristics.
  • Showing progress bar.
  • Quick buffer exit.
  • More reusable history.

In addition to replacing shell-command with dwim-shell-command, I also use it to bring all sorts of command line utilities to familiar Emacs workflows (in dired or current buffers), without having to remember complex command invocations.

I've covered many of the use-cases before: