Compare commits
No commits in common. "043556e798e83f7967dc594f1e6159a94000c165" and "8bb09f1573c57a8ac4fdcecabd67515f489e4bd3" have entirely different histories.
043556e798
...
8bb09f1573
2 changed files with 6 additions and 13 deletions
13
README.md
13
README.md
|
@ -51,17 +51,10 @@ $your_image_viewer blah_g1.bmp
|
|||
using repl works via `scritcher repl scri_file.scri input_image.bmp`
|
||||
|
||||
you type commands as you'd write the specific scritcher commands
|
||||
(`doc/README.md`), with four repl-specific ones (semicolons do not apply):
|
||||
(`doc/README.md`), with three repl-specific ones:
|
||||
- `push`, to push the last written command to the queue
|
||||
- `save`, to write the queue to the given `scri_file.scri` file
|
||||
- `list`, to print the current contents of the queue
|
||||
- `quit`, to exit
|
||||
|
||||
After a non-REPL command, such as an effect, the program pointed by
|
||||
`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.
|
||||
this allows for quicker iteration of commands, as you can type a command, tweak
|
||||
its arguments, and when satisfied, `push` it, and work on the next one, etc.
|
||||
|
|
|
@ -104,8 +104,8 @@ pub fn doRepl(allocator: *std.mem.Allocator, args_it: var) !void {
|
|||
var runqs_args = langs.ArgList.init(allocator);
|
||||
defer runqs_args.deinit();
|
||||
|
||||
const wanted_runner: []const u8 = std.os.getenv("SCRITCHER_RUNNER") orelse "ristretto";
|
||||
try runqs_args.append(wanted_runner);
|
||||
// TODO change the runqs command to something given in an env var
|
||||
try runqs_args.append("ristretto");
|
||||
|
||||
while (true) {
|
||||
lang.reset();
|
||||
|
@ -182,7 +182,7 @@ pub fn main() !void {
|
|||
// TODO print help
|
||||
|
||||
_ = try (args_it.next(allocator) orelse @panic("expected exe name"));
|
||||
const scri_path = try (args_it.next(allocator) orelse @panic("expected scri path or 'repl'"));
|
||||
const scri_path = try (args_it.next(allocator) orelse @panic("expected scri path"));
|
||||
|
||||
if (std.mem.eql(u8, scri_path, "repl")) {
|
||||
return try doRepl(allocator, &args_it);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue