summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/CHANGELOG.md62
-rw-r--r--src/builtins.zig5
-rw-r--r--src/edit_cmd.zig94
-rw-r--r--src/ninep/ctl.zig1
-rw-r--r--src/ninep/tree.zig2
-rw-r--r--src/selection_pipe.zig74
-rw-r--r--src/tutor.txt23
7 files changed, 223 insertions, 38 deletions
diff --git a/src/CHANGELOG.md b/src/CHANGELOG.md
index 24ee3b0e..efccc785 100644
--- a/src/CHANGELOG.md
+++ b/src/CHANGELOG.md
@@ -58,18 +58,76 @@
`*` sets a search from the selection; `Alt-*` omits word boundaries.
The location ring remains as LookNext/LookPrev (Space j n/p).
-## 0.23
-
- A file a language server speaks for (by its extension) has `Def` and
`Refs` in its tag: the definition and the references of the symbol at
the cursor, which `gd`, `gr` and a Ctrl-click run too. Chorded 2-1, they
ask at the selected symbol instead, its occurrence nearest the cursor.
- A scroll in the window never moves the tree-sitter context rows: the
body glides under them.
+
+## 0.24
+
+- Edit runs all of acme's commands: `< | >` through your Shell (one undo
+ step, a failure changes nothing, its stderr in +Errors), `X` and `Y` over
+ the open panes, `b B D e r w f` and the `"re"` file address. A pane a
+ running filter changes refuses Del, Undo, Get and Zerox (busy), and a
+ flushed or dropped Edit write kills its commands.
+- Edit's `w` to a file changed on disk is refused once, as Save is
+ (`w again to overwrite`).
- A look at a directory opens a pane listing it, as acme's directory
window does: its entries in columns, a directory's marked `/`. A look at
an entry opens it from there, and `Get` or a look at it again reads it
again. `DirLook terminal` types `ls` into a terminal there, as before.
+- One Look path: Enter, Tab and a bare Look take what a click at the
+ cursor takes, a diff line's address included, and an event reader hears
+ them as clicks.
+- Get reads a pane's file again, asking once over unsaved edits; `Get file`
+ loads another, and Undo puts the old name and text back. Load is Restore.
+- Putall saves every pane with unsaved edits. Zerox opens a second pane on
+ the same buffer, kept across Dump and Restore.
+- `Tab N` sets the tab width, 1 to 16. `Incl dir` adds directories a look
+ tries for a name found nowhere else, `<stdio.h>` too.
+- Enter, `o` and `O` keep the line's indent as it is, tabs included, as
+ acme's autoindent does.
+- Back and Forward (Ctrl-o, Ctrl-i, SPC j o, SPC j i, the mouse's side
+ buttons) keep to the focused file first; `JumpScope all` walks every
+ place in order. `n` in a command pane walks its own errors first.
+- Alt/Option-click is B2 and Super/Cmd-click is B3, sweeps included, for
+ one-button mice and trackpads; a terminal passes only Alt.
+- Shift-Esc always backs out to the previous pane, in every mode; Ctrl-b
+ alone toggles raw. SPC q quits, as Exit.
+- A +Pager keeps its program's colours; `PagerColor off` pages it plain.
+- Every pane gets `$PARDES_MOUNT`, the session's directory under
+ `9ns --mntgen`.
+- Editing a terminal's text in normal mode says it edits a copy, which Tab
+ or B2 runs and the program's next drawing replaces.
+- A path typed into a tag survives Esc: Enter renames, a second Esc drops
+ it.
+- The init file reads past a BOM, says each failing line with its number,
+ skips settings only the other frontend has, and applies when saved in a
+ pane.
+- `pardes --wait` with no FILE or a gone session, and `--detach` over a
+ name in use, say so in words.
+- File reads say `is a directory`, `permission denied` or `not a regular
+ file`; a device is never read to the stream limit.
+- A dump no longer embeds a picture or PDF that is on disk; Restore reads
+ it from there.
+- Fixed: a mouse report past the window's top or left edge crashed the
+ terminal frontend, losing unsaved text.
+- Fixed: an unsaved pane restored from an older dump could Save over a
+ newer file without asking.
+- Fixed: a PDF with a JPEG image crashed ReleaseSafe and Debug builds.
+- Fixed: the window drew every frame after focus moved to a PDF while the
+ cursor glided.
+- cloud9's 9ns writes in parallel, so an Edit filter can write its own ctl
+ through a mount without waiting, and drops a dead mount's entry off its
+ serving thread.
+- The docs are a website, pardes.0x4200.cafe (`zig build site`): recordings, a builtins
+ glossary, a theme gallery, and static builds with checksums. pardes is
+ ISC-licensed.
+
+## 0.23
+
- Restore reads a clean file pane from disk, so a file changed since the
Dump comes back as it is now. An unsaved pane keeps its text, and if its
file changed on disk its first Save asks before overwriting. A dump holds
diff --git a/src/builtins.zig b/src/builtins.zig
index 46b61ff7..cc7d1d4a 100644
--- a/src/builtins.zig
+++ b/src/builtins.zig
@@ -1150,6 +1150,7 @@ pub const Get = struct {
pub const takes_arg = true;
pub fn run(c: Ctx) void {
const ctl = @import("ninep/ctl.zig");
+ if (@import("edit_cmd.zig").busyOn(c.p, c.id)) return c.p.reportFailure(c.id, "Get: " ++ @import("edit_cmd.zig").e_busy);
const f = if (c.pane.file) |*file| file else return c.p.reportFailure(c.id, "Get: only a file pane takes it");
const typed = std.mem.trim(u8, c.arg orelse "", " \t\r\n");
// A directory pane: the directory read again (Dir.zig), as acme's
@@ -1256,6 +1257,7 @@ pub const Incl = struct {
/// unsaved state, with a scroll and a cursor of its own (File.zerox).
pub const Zerox = struct {
pub fn run(c: Ctx) void {
+ if (@import("edit_cmd.zig").busyOn(c.p, c.id)) return c.p.reportFailure(c.id, "Zerox: " ++ @import("edit_cmd.zig").e_busy);
const f = c.pane.file orelse return c.p.reportFailure(c.id, "Zerox: only a file pane takes it");
if (f.output != null or f.listing != null or f.mini != null) return c.p.reportFailure(c.id, "Zerox: only a file pane takes it");
const free = c.p.freeSlot() orelse return c.p.reportError(c.id, "Zerox", error.NoPaneSlots);
@@ -1311,6 +1313,7 @@ pub const Del = struct {
pub const takes_arg = true;
pub fn run(c: Ctx) void {
const side = std.mem.trim(u8, c.arg orelse "", " \t\r\n");
+ if (@import("edit_cmd.zig").busyOn(c.p, c.id)) return c.p.reportFailure(c.id, "Del: " ++ @import("edit_cmd.zig").e_busy);
// acme's Del asks winclean first (exec.c del): unsaved text is warned
// about once, and the same Del again, nothing edited since, closes.
if (warnModifiedIn(c, .Del, .{ .pane = c.id })) return;
@@ -1403,6 +1406,7 @@ pub const Edit = struct {
/// limits.undo_max steps (256).
pub const Undo = struct {
pub fn run(c: Ctx) void {
+ if (@import("edit_cmd.zig").busyOn(c.p, c.id)) return c.p.reportFailure(c.id, "Undo: " ++ @import("edit_cmd.zig").e_busy);
if (c.pane.file) |f| if (f.history.undo_len == 0) return c.p.setMessage(c.id, "Undo: nothing to undo");
edit.doUndo(c.p, &c.pane.body);
}
@@ -1411,6 +1415,7 @@ pub const Undo = struct {
/// Redo the last undone edit.
pub const Redo = struct {
pub fn run(c: Ctx) void {
+ if (@import("edit_cmd.zig").busyOn(c.p, c.id)) return c.p.reportFailure(c.id, "Redo: " ++ @import("edit_cmd.zig").e_busy);
if (c.pane.file) |f| if (f.history.redo_len == 0) return c.p.setMessage(c.id, "Redo: nothing to redo");
edit.doRedo(c.p, &c.pane.body);
}
diff --git a/src/edit_cmd.zig b/src/edit_cmd.zig
index 447ea66b..c8473e99 100644
--- a/src/edit_cmd.zig
+++ b/src/edit_cmd.zig
@@ -67,6 +67,7 @@ pub const Write = struct {
const World = struct {
p: *Pardes,
from: usize,
+ arena: std.mem.Allocator,
fn check(ctx: *anyopaque, path: []const u8, why: *sam.Why) bool {
const w: *World = @ptrCast(@alignCast(ctx));
@@ -105,7 +106,7 @@ const World = struct {
const pane = slot orelse continue;
const f = ninep_pane.fileOf(pane) orelse continue;
if (!std.mem.eql(u8, f.path, path)) continue;
- return fileOf(pane, id);
+ return fileOf(w.arena, pane, id) catch said(sam.File, why, "B: out of memory", .{});
}
return said(sam.File, why, "B: cannot open {s}", .{path});
}
@@ -115,13 +116,9 @@ const World = struct {
if (comptime pardes.hosted) if (filesystem.localPath(path)) |local| if (@import("exec.zig").isDirectory(local))
return said([]const u8, why, "{s} is a directory", .{path});
const bytes = filesystem.read(w.p, path) catch |err| {
- const name = @errorName(err);
- const words = if (std.mem.eql(u8, name, "FileNotFound"))
- "file does not exist"
- else if (std.mem.eql(u8, name, "AccessDenied") or std.mem.eql(u8, name, "PermissionDenied"))
- "permission denied"
- else
- name;
+ // In the words Get says them (builtins.Get).
+ var buf: [128]u8 = undefined;
+ const words = if (err == error.FileNotFound) "no such file" else pardes.Messages.errorWords(err, &buf);
return said([]const u8, why, "can't open {s}: {s}", .{ path, words });
};
defer w.p.gpa.free(bytes);
@@ -134,10 +131,13 @@ const World = struct {
}
};
-fn fileOf(pane: *panes.Pane, id: usize) sam.File {
+/// What the Edit sees of a pane. Its name is a copy in `arena`: the pane
+/// may be gone by the time a running Edit's end says it. Its text is the
+/// pane's own, read only while the Edit runs its commands' parse.
+fn fileOf(arena: std.mem.Allocator, pane: *panes.Pane, id: usize) !sam.File {
const f = ninep_pane.fileOf(pane).?;
return .{
- .name = f.path,
+ .name = try arena.dupe(u8, f.path),
.text = f.content,
.dot = ninep_pane.dotOf(pane),
.dirty = ninep_pane.dirtyOf(pane),
@@ -162,7 +162,7 @@ pub fn run(p: *Pardes, id: usize, command: []const u8) void {
for (p.panes, 0..) |slot, i| {
const q = slot orelse continue;
if (q.file == null) continue;
- files.append(arena, fileOf(q, i)) catch |err| return p.reportError(id, "Edit", err);
+ files.append(arena, fileOf(arena, q, i) catch |err| return p.reportError(id, "Edit", err)) catch |err| return p.reportError(id, "Edit", err);
}
std.mem.sort(sam.File, files.items, p, struct {
fn before(core: *Pardes, a: sam.File, b: sam.File) bool {
@@ -173,7 +173,7 @@ pub fn run(p: *Pardes, id: usize, command: []const u8) void {
if (f.id == id) break i;
} else unreachable;
- var world: World = .{ .p = p, .from = id };
+ var world: World = .{ .p = p, .from = id, .arena = arena };
var why: sam.Why = .{};
var text: [260]u8 = undefined;
const res = sam.run(arena, files.items, cur, command, .{ .ctx = &world, .check = World.check, .open = World.open, .read = World.read, .refuseGet = World.refuseGet }, &why) catch |err| switch (err) {
@@ -221,7 +221,7 @@ pub fn run(p: *Pardes, id: usize, command: []const u8) void {
for (res.jobs, 0..) |job, i| {
const f = res.files[job.file];
commands[i] = job.command;
- cwds[i] = Pardes.paneDir(p.panes[f.id].?);
+ cwds[i] = arena.dupe(u8, Pardes.paneDir(p.panes[f.id].?)) catch |err| return p.reportError(id, "Edit", err);
inputs[i] = .{ .bytes = if (job.c == '<') "" else arena.dupe(u8, f.text[job.q0..job.q1]) catch |err| return p.reportError(id, "Edit", err) };
}
p.pipe.seq +%= 1;
@@ -247,6 +247,29 @@ pub fn run(p: *Pardes, id: usize, command: []const u8) void {
if (p.fs.serving) p.fs.edit_started = true;
}
+/// What a pane whose Edit's commands are running refuses to do beside them:
+/// close, undo, redo, Get, Zerox (busyOn).
+pub const e_busy = "busy: an Edit's commands are running on it";
+
+/// Whether pane `id` (or a Zerox twin of it) is one the Edit whose commands
+/// are running will change or run a command on.
+pub fn busyOn(p: *Pardes, id: usize) bool {
+ const pd = p.pipe.edit_run orelse return false;
+ const pane = p.panes[id] orelse return false;
+ const twin = if (pane.file) |f| f.twin else 0;
+ for (pd.res.files, 0..) |f, i| {
+ const used = changes(f) or for (pd.res.jobs) |job| {
+ if (job.file == i) break true;
+ } else false;
+ if (!used) continue;
+ const q = p.panes[f.id] orelse continue;
+ if (q.serial != pd.serials[i]) continue;
+ if (f.id == id) return true;
+ if (twin != 0) if (q.file) |qf| if (qf.twin == twin) return true;
+ }
+ return false;
+}
+
/// Whether the Edit changes file `f`: its text, its name, or its pane.
fn changes(f: sam.File) bool {
return f.ops.items.len > 0 or f.get != null or f.close or f.renamed;
@@ -729,3 +752,48 @@ test "an Edit with no command runs beside one whose commands run, unless it touc
answer(p, &.{"a\nb\n"});
try testing.expectEqualStrings("a\nb\n", p.panes[0].?.file.?.content);
}
+
+test "a pane an Edit's commands will change is not closed under them, and one closed anyway is named, not read freed" {
+ const p = try th.withFile(testing.allocator, "b\na\n");
+ defer p.deinit();
+ const serial = th.serialOf(p);
+ const ctl = tree.Node.of(serial, .ctl);
+ try testing.expectEqual(tree.Status.ok, th.wr(p, ctl, "Edit ,|sleep 0.8; cat\n").reply.status);
+ // Del, acme's delete, rmdir, Undo, Redo, Get, Zerox: busy, EBUSY.
+ for ([_][]const u8{ "delete\n", "Del\n", "Undo\n", "Redo\n", "get\n", "Get\n", "Zerox\n" }) |line| {
+ const busy = th.wr(p, ctl, line);
+ try testing.expectEqual(tree.E.BUSY, busy.errno());
+ try testing.expect(std.mem.indexOf(u8, busy.reply.ename, e_busy) != null);
+ }
+ try testing.expectEqual(tree.E.BUSY, th.rmdir(p, tree.Node.of(serial, .dir)).errno());
+ try testing.expect(p.paneBySerial(serial) != null);
+ // Closed by a way that does not ask (a session's own teardown of one
+ // pane): the Edit's end names it from its own copy.
+ p.fs.edit_hold = .{ .asker = @ptrCast(p), .slot = 0, .seq = 1, .tag = 2, .node = ctl, .handle = 0, .written = 1 };
+ try p.removePane(0, null);
+ answer(p, &.{"a\nb\n"});
+ try testing.expectEqualStrings("Edit: /test.txt closed while its commands ran; nothing changed", filesystem.EditHold.answer(&p.fs).ename);
+}
+
+test "a session that ends while an Edit's commands run lets the Edit go" {
+ const p = try th.withFile(testing.allocator, "x\n");
+ try testing.expectEqual(tree.Status.ok, th.wr(p, tree.Node.of(th.serialOf(p), .ctl), "Edit ,|sleep 5; cat\n").reply.status);
+ try testing.expect(p.pipe.edit_run != null);
+ p.deinit(); // the testing allocator says if anything is kept
+}
+
+test "e and r say a file that cannot be read as Get says it" {
+ if (comptime !pardes.hosted or !filesystem.platform_has_fs) return error.SkipZigTest;
+ const p = try th.withFile(testing.allocator, "x\n");
+ defer p.deinit();
+ const ctl = tree.Node.of(th.serialOf(p), .ctl);
+ for ([_][2][]const u8{
+ .{ "Edit 0r /dev/zero\n", "not a regular file" },
+ .{ "Edit 0r /tmp\n", "is a directory" },
+ .{ "Edit 0r /nonexistent-pardes-file\n", "no such file" },
+ }) |c| {
+ const r = th.wr(p, ctl, c[0]);
+ try testing.expect(r.reply.status == .err);
+ try testing.expect(std.mem.indexOf(u8, r.reply.ename, c[1]) != null);
+ }
+}
diff --git a/src/ninep/ctl.zig b/src/ninep/ctl.zig
index 3e7c367b..733d9c8e 100644
--- a/src/ninep/ctl.zig
+++ b/src/ninep/ctl.zig
@@ -1016,6 +1016,7 @@ pub fn writePane(p: *Pardes, req: Req, pane: *Pane) Reply {
}
if (std.mem.eql(u8, line, "get")) {
if (!apply) continue;
+ if (@import("../edit_cmd.zig").busyOn(p, p.paneBySerial(serial).?)) return tree.failText(req.tag, E.BUSY, "get: " ++ @import("../edit_cmd.zig").e_busy);
// Quoting the line, as a builtin's refusal (Save's) does.
if (getRefused(p, pane, "get")) |said_in_ename| {
// refuse writes ename, where the words are: copy them out.
diff --git a/src/ninep/tree.zig b/src/ninep/tree.zig
index 9aa0225a..59ef5ef4 100644
--- a/src/ninep/tree.zig
+++ b/src/ninep/tree.zig
@@ -937,6 +937,8 @@ fn remove(p: *Pardes, req: Req) Reply {
};
if (t.file != .dir) return Reply.fail(req.tag, E.PERM);
const id = p.paneBySerial(t.serial) orelse return Reply.fail(req.tag, E.NOENT);
+ // A pane an Edit's running commands will change stays until they end.
+ if (@import("../edit_cmd.zig").busyOn(p, id)) return failText(req.tag, E.BUSY, @import("../edit_cmd.zig").e_busy);
p.removePane(id, null) catch return Reply.fail(req.tag, E.IO);
return .{ .tag = req.tag };
}
diff --git a/src/selection_pipe.zig b/src/selection_pipe.zig
index 66444b04..c3e5e3a6 100644
--- a/src/selection_pipe.zig
+++ b/src/selection_pipe.zig
@@ -214,17 +214,53 @@ pub const Tasks = struct {
}
};
+/// The stdin writer's own: its copy of the input, freed by the writer when
+/// it is done, so a writer stuck on a command that never reads (and cannot
+/// be killed, below) can be let go of without its input dying under it.
const WriterContext = struct {
+ gpa: std.mem.Allocator,
io: std.Io,
file: std.Io.File,
- input: []const u8,
- ok: bool = false,
+ input: []u8,
};
fn writeInput(context: *WriterContext) void {
- defer context.file.close(context.io);
+ defer {
+ context.file.close(context.io);
+ context.gpa.free(context.input);
+ context.gpa.destroy(context);
+ }
context.file.writeStreamingAll(context.io, context.input) catch return;
- context.ok = true;
+}
+
+/// Kills the command's group, then `abandon`s it.
+fn abandonNow(io: std.Io, child: *std.process.Child, pid: std.posix.pid_t) void {
+ // Before the shell is reaped, while its group id cannot be another's.
+ std.posix.kill(-pid, .KILL) catch {};
+ std.posix.kill(pid, .KILL) catch {};
+ abandon(io, child.*);
+ child.id = null;
+ child.stdout = null;
+ child.stderr = null;
+}
+
+/// A command given up on, killed and reaped where nothing waits for it: a
+/// process in uninterruptible sleep (a write to a file of this very
+/// session, through its mount, waiting on the request whose answer is
+/// waiting on this command) dies only when that request is answered, and
+/// the answer must not wait on its death.
+fn abandon(io: std.Io, child: std.process.Child) void {
+ const Reap = struct {
+ fn run(i: std.Io, c: std.process.Child) void {
+ var reaped = c;
+ reaped.kill(i);
+ }
+ };
+ const thread = std.Thread.spawn(.{}, Reap.run, .{ io, child }) catch {
+ var c = child;
+ return c.kill(io);
+ };
+ thread.detach();
}
/// Run one POSIX shell command with exact stdin, concurrently draining stdout
@@ -350,23 +386,33 @@ pub fn runIn(
}) catch return fail.k(.spawn);
const pid = child.id.?;
- var writer_context: WriterContext = .{
+ const writer_context = gpa.create(WriterContext) catch {
+ abandonNow(io, &child, pid);
+ return fail.k(.spawn);
+ };
+ writer_context.* = .{
+ .gpa = gpa,
.io = io,
.file = child.stdin.?,
- .input = input,
+ .input = gpa.dupe(u8, input) catch {
+ gpa.destroy(writer_context);
+ abandonNow(io, &child, pid);
+ return fail.k(.spawn);
+ },
};
child.stdin = null; // writer_context owns and closes this endpoint
- var writer: ?std.Thread = std.Thread.spawn(.{}, writeInput, .{&writer_context}) catch {
+ var writer: ?std.Thread = std.Thread.spawn(.{}, writeInput, .{writer_context}) catch {
writer_context.file.close(io);
- child.kill(io);
+ gpa.free(writer_context.input);
+ gpa.destroy(writer_context);
+ abandonNow(io, &child, pid);
return fail.k(.spawn);
};
- // On every early return kill first, unblocking a command which never read
- // stdin, then join the short-lived writer before its borrowed input dies.
- defer if (writer) |thread| thread.join();
- defer child.kill(io);
- // Before the shell is reaped, while its group id cannot be another's.
- defer if (child.id != null) std.posix.kill(-pid, .KILL) catch {};
+ // On every early return (a timeout, a ceiling) the answer goes at once:
+ // the group is killed and the shell left to be reaped elsewhere
+ // (abandon), and the writer, which owns its input, let go.
+ defer if (writer) |thread| thread.detach();
+ defer if (child.id != null) abandonNow(io, &child, pid);
defer if (token != 0) Running.remove(pid);
if (token != 0 and !Running.add(token, pid)) return fail.k(.signal);
diff --git a/src/tutor.txt b/src/tutor.txt
index b71b3bf2..083a5028 100644
--- a/src/tutor.txt
+++ b/src/tutor.txt
@@ -28,9 +28,10 @@
2. Press Esc once more, in NORMAL: the keyboard goes back to the
pane you were in before (not what helix does). Come back with
Esc again.
- 3. Press Alt-n: a terminal opens, in NORMAL mode. Press Ctrl-b: its
- box shows $ (RAW), and keys go to the shell. Esc brings you back
- here; the terminal stays $. Shift-Esc sends the shell an Esc.
+ 3. Press Alt-n: a terminal opens, in NORMAL mode, and pardes types
+ ls at its first prompt. Press Ctrl-b: its box shows $ (RAW), and
+ keys go to the shell. Esc brings you back here; the terminal stays
+ $. Shift-Esc sends the shell an Esc.
-> Guide: Modes
@@ -66,8 +67,8 @@
| Tty Collapse Del
1. Press : here: the keyboard goes to this pane's tag, on `Save`.
- Press A, type a space and Help, press Esc, then `Exec`
- `Help` there. Press : again to come back.
+ Press A, type a space and Help, press Esc, then Tab: `Help`
+ runs and its list takes the keyboard. Esc brings you back.
2. Click `Collapse` in this tag: the pane folds to its tag. Click
it again.
3. Drag the box left of the tag down a few rows, then back.
@@ -86,6 +87,8 @@
3. Ctrl-w shows a letter on every pane: h, j, k, l move the outline
and Enter goes there, or press a pane's letter. Ctrl-o and
Ctrl-i walk back and forward through where you have been.
+ Ctrl-i needs the kitty keyboard protocol or the GUI; elsewhere it
+ is Tab, so use SPC j i (and SPC j o), or the mouse's side buttons.
4. `Del` the scratch and the command pane, each in its own tag.
-> Guide: Where commands run and panes go
@@ -96,7 +99,8 @@
=================================================================
1. `Look` :20 here: the cursor goes to line 20 of this pane.
- 2. `Look` :/UNSAVED/ to go to the next match of UNSAVED.
+ 2. Drag across :/^=.*UNSAVED/ with B3 held: `Look` takes exactly
+ what you swept, a regex here, and goes to Part 7's heading.
3. Press /, type keys, press Enter: a +Search lists the lines with
keys and the cursor goes to the first. n and N select search matches.
@@ -107,9 +111,9 @@
= PART 6 — TERMINALS =
=================================================================
- 1. In the terminal from part 1 (or Alt-n again), type ls and press
- Enter in RAW mode. Then Ctrl-b to NORMAL: move over its output
- with j and k, select a name with x, yank it with y.
+ 1. In the terminal from part 1 (or Alt-n again), its ls has listed
+ the directory. Press Ctrl-b to NORMAL, put the cursor on a name
+ with j, k and w, select it with m i W, and yank it with y.
2. Come back here (Ctrl-w, or click) and press p: the name is
pasted; yank and paste are shared by every pane.
3. `Del` the terminal: it closes with its shell.
@@ -331,6 +335,7 @@ typed
PANES Ctrl-w h/j/k/l pick a pane, Enter (NORMAL mode)
Ctrl-o / Ctrl-i jump history back / forward
+ (SPC j o / SPC j i where Ctrl-i is Tab)
Alt-n new terminal Alt-c pane into a new column
KEYS h j k l w b e 0 gl ^ gg ge f F t T v x d c y p