arzhur
is a simple program that implements a interactive filter for the editing, execution, and piping of arbitrary text.
arzhur
can receive text from either stdin or supplied arguments and will treat each argument or each line of input as a separate "window". Each window may be edited and printed to stdout by itself or joined with the other lines.
Windows can be selected with the h
and l
keys, created with n
, and deleted (only the final window) with d
.
arzhur
implements a system for executing and piping text similar to that of acme
. The !
command functions as an equivalent to the middle click, executing the focused text as a command a creating a new window for its output. <
replaces the executed text, or the contents of the marked window with output. >
pipes the marked text, putting the output in a new window. |
pipes and replaces at once.
- Editing Mode
ESCAPE
: Enter command modeENTER
: Exit and print the contents of the current window to stdout
- Command Mode
ESCAPE
: Enter editing modeENTER
: Exit and print the contents of the current window to stdouth
: Go backwards a tabl
: Go forwards a taba
: Exit and print the contents of all of the windows joined by newlines to stdoutq
: Exit and return nothingn
: Create a new, empty windowd
: Delete the last windowm
: Mark or unmark the current windowM
: Unmark the marked windowp
: Insert the marked text into the current windowN
: Insert a newline characterc
: Clear the contents of the current window!
: Execute the contents of the current window as a command, with output going to a new window<
: Replace the current or marked window's text with the output of itself as a command>
: Pipe the marked text to the current window's command put the output in a new window|
:<
and>
combined.
Usage of arzhur:
-n Open an empty window on start.
-s Don't split input into lines.