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

Álvaro Ramírez

11 May 2023 dwim-shell-command on Windows + upload to 0x0.st

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 0x0.st implementation. I'd been wanting to do something similar for imgur, but 0x0.st is a much better alternative!

0x0.gif

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

  • Open the uploaded image in eww browser.
  • Automatically copy the upload URL to kill-ring. 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: