Skip to content

small-tech/sote

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Send Output To Editor (sote)

Pronounced sauté, get it? (Sorry.)

Sends the output of the last command to your default editor.

If that’s something like Helix Editor, you can use multiple cursors, etc., to manipulate it and copy it into the system clipboard (spacey in Helix) to use in future commands.

⚠️ Sote re-runs the last command in order to get the output so don’t use it after a command that has side-effects.

💡 Terminals/shells could provide much better support for this use case. Given how obsessed some folks are about never touching the mouse, I’m quite suprised it hasn’t happened yet.

Install

Install using Fisher:

fisher install small-tech/sote

Use

You can use the sote command or, even better, bind it to a keyboard shortcut. For example, to bind it to ctrls, add the following to your fish configuration (likely ~/.config/fish/config.fish):

bind \cs sote

How it works

Technically, like basically everything else in Fish shell, it’s just a function.

It gets your last history item ($history[1]), re-runs it using eval(), then splits the output into multiple lines and sends it to your $EDITOR.

Related tools and workflows

  • Instead of getting a directory listing (e.g., ls -1) and manipulating the results with Sote, you could use a file manager like lf that lets you make multiple selections (in lf, by pressing space).

  • Specifically for renaming multiple files, see mmv.

Like this? Fund us!

Small Technology Foundation is a tiny, independent not-for-profit.

We exist in part thanks to patronage by people like you. If you share our vision and want to support our work, please become a patron or donate to us today and help us continue to exist.

Copyright

Copyright © 2022-present Aral Balkan, Small Technology Foundation.

License

Sote is released under ISC.

About

Send Output To Editor Fish(er) Plugin

Resources

License

Stars

Watchers

Forks

Sponsor this project

Packages

No packages published

Languages