Skip to content
/ edio Public

📻 A command-line tool that opens stdin in your editor, lets you edit the content interactively, and outputs the result to stdout.

License

Notifications You must be signed in to change notification settings

muleyuck/edio

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

unit-test Software License Release

📻 edio

A command-line tool that opens stdin in your editor, lets you edit the content interactively, and outputs the result to stdout.

demo

Installation

Shell script

curl --proto '=https' --tlsv1.2 -LsSf https://github.com/muleyuck/edio/releases/latest/download/edio-installer.sh

Homebrew

brew install muleyuck/tap/edio

Usage

edio [OPTIONS]

Options

  • -e, --extension <EXTENSION>: Set file extension for the temporary file (default: txt)

Examples

Basic usage: Edit stdin and print to stdout

echo "Hello, World!" | edio

Edit and save to a file

echo "Initial content" | edio > output.txt

Edit stdin in specific editor(e.g. VSCode)

export EDITOR="code --wait"
echo "Initial content" | edio > output.txt

Edit with specific file extension for syntax highlighting

cat script.py | edio -e py | python

Editor Selection Logic

edio determines which editor to use in the following order:

  1. $GIT_EDITOR environment variable
  2. $VISUAL environment variable
  3. $EDITOR environment variable
  4. git config core.editor
  5. vi (fallback)

Requirements

  • Unix-like operating system (Linux, macOS)
  • Access to /dev/tty when output is piped

LICENCE

The MIT Licence

About

📻 A command-line tool that opens stdin in your editor, lets you edit the content interactively, and outputs the result to stdout.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published