Update README on new env var

This commit is contained in:
Luna 2020-04-10 00:20:46 -03:00
parent 9614b96c71
commit 043556e798
2 changed files with 11 additions and 4 deletions

View file

@ -51,10 +51,17 @@ $your_image_viewer blah_g1.bmp
using repl works via `scritcher repl scri_file.scri input_image.bmp` using repl works via `scritcher repl scri_file.scri input_image.bmp`
you type commands as you'd write the specific scritcher commands you type commands as you'd write the specific scritcher commands
(`doc/README.md`), with three repl-specific ones: (`doc/README.md`), with four repl-specific ones (semicolons do not apply):
- `push`, to push the last written command to the queue - `push`, to push the last written command to the queue
- `save`, to write the queue to the given `scri_file.scri` file - `save`, to write the queue to the given `scri_file.scri` file
- `list`, to print the current contents of the queue - `list`, to print the current contents of the queue
- `quit`, to exit
this allows for quicker iteration of commands, as you can type a command, tweak After a non-REPL command, such as an effect, the program pointed by
its arguments, and when satisfied, `push` it, and work on the next one, etc. `SCRITCHER_RUNNER` will run as argument to the `runqs` command. By default,
the program run will be `ristretto` (as it is my preffered image viewer,
considering it was able to handle when some images went broke)
this allows for quicker iteration of commands, as you can type a command, see
the image changes as fast as possible, tweak its arguments,
and when satisfied, `push` it, and work on the next command, etc.

View file

@ -182,7 +182,7 @@ pub fn main() !void {
// TODO print help // TODO print help
_ = try (args_it.next(allocator) orelse @panic("expected exe name")); _ = try (args_it.next(allocator) orelse @panic("expected exe name"));
const scri_path = try (args_it.next(allocator) orelse @panic("expected scri path")); const scri_path = try (args_it.next(allocator) orelse @panic("expected scri path or 'repl'"));
if (std.mem.eql(u8, scri_path, "repl")) { if (std.mem.eql(u8, scri_path, "repl")) {
return try doRepl(allocator, &args_it); return try doRepl(allocator, &args_it);