Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cute-jumper/epipe
A fork of vipe to support emacsclient
https://github.com/cute-jumper/epipe
Last synced: about 2 months ago
JSON representation
A fork of vipe to support emacsclient
- Host: GitHub
- URL: https://github.com/cute-jumper/epipe
- Owner: cute-jumper
- License: gpl-3.0
- Created: 2016-10-21T02:23:28.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-02-16T05:01:44.000Z (almost 7 years ago)
- Last Synced: 2024-08-03T01:38:24.719Z (5 months ago)
- Language: Perl
- Size: 146 KB
- Stars: 29
- Watchers: 4
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.org
- License: LICENSE
Awesome Lists containing this project
README
#+TITLE: epipe
Use your favorite editor in the pipeline, featuring the support for
running =emacsclient= in the terminal.This tool enables the use of emacs(client) for interactive editing of the
output/input of shell commands.* Usage
First, set an alias for =epipe=:
: alias epipe=/path/to/epipeThen you can use =epipe= in one of the following ways:
: command1 | epipe
: epipe | command1
: command1 | epipe | command2Since emacs can now be used in the pipeline, =epipe= saves us from writing
=grep=, =sed=, =awk=, etc., in order to process the output/input of shell
commands. The use of =epipe= can also replace some other interactive commands,
for example, the interactive grep, [[https://github.com/mooz/percol][percol]].You need to set either =EDITOR= or =VISUAL= environment variable. If you don't
set =EDITOR= or =VISUAL=, =epipe= uses =emacs= as the default editor. In order
to use =emacsclient= as the editor, you can set =EDITOR= environment variable:
: export EDITOR="emacsclient -ct"A really simple example:
[[./epipe.gif]]* References
This idea has been implemented in =vipe=, but none of the current
implementation supports =emacsclient= in the terminal. That said, setting
=EDITOR= to =emacsclient -t= doesn't work for =vipe= while setting =EDITOR= to
=emacsclient= works since it creates/uses the frame in the window system
instead of the current terminal.- [[https://joeyh.name/code/moreutils/][vipe of moreutils]]: To the best of my knowledge, the original =vipe= is
implemented by Joey Hess using perl. But it doesn't support running
=emacsclient= in the terminal.
- [[https://github.com/juliangruber/vipe/][juliangruber/vipe]]: I found this repo after I wrote the code. This one is
similar to =epipe= since the author also rewrote the original =vipe= of Joey
Hess using shell script. However, the problem remains the same -- it doesn't
support running =emacsclient= in the terminal.* Perl Version
I also put a modified verion of Joey's =vipe= in this repo: =epipe.pl=. The
code of =vipe= is changed a little bit to support =emacsclient=. You can check
it out if interested.* Final Notes
- Tested =epipe= on Arch Linux and GuixSD.
- Can't use with =-a= option of =emacsclient=