Skip to content

History ​

Press ↑ at the prompt to bring back the last line you sent. Keep pressing to go further back, and ↓ to come forward again. Whatever you were typing is kept: step past the newest line and it comes back.

At a glance

  • You will send a line again, or a changed copy of it, without typing it out.
  • Use it when you give the same task or the same steer more than once, or want to fix a typo in a long line you just sent.
  • You need hmz open, and at least one line sent before. Anywhere counts.

Try it ​

At an empty prompt, press ↑. Edit what comes back if you like, and press enter.

hmz
hmz: three commands sent; then, with "fix the flaky" half typed, up brings back /afk off, /clear and /afk on in turn, and down walks forward again until "fix the flaky" is back at the prompt

How it works ​

Every line you send at the prompt is written down, with the directory you sent it in. The arrows walk that list, newest first, and put each line in the editor as if you had typed it. Nothing is sent until you press enter, so a line brought back is yours to change.

The walk has a draft: whatever was in the editor when you pressed the first ↑. It is kept aside, not lost, and ↓ past the newest line gives it back. A key pressed by mistake cannot take a half-written prompt with it.

Example: walk back three lines and return ​

You have sent /afk on, /afk off and /clear here, and have now typed fix the flaky. Step through the presses:

hmz · chatdrawn, not recorded
❯ /afk on
away: agents that ask are told nobody is here
❯ /afk off
here: an agent may stop and ask you
❯ /clear
❯ fix the flaky1
◉ chat · ~/tmp/humanize-demoenter start · / commands · shift+enter newline · ctrl+c clear

Half a line typed, and three lines sent before it.

What to look at, by number:

  1. Your draft. Half a line, not sent. The first ↑ sets it aside.
  2. The newest line first. /clear was the last thing you sent, so it comes back first.
  3. The far end. /afk on is the oldest line here. Pressing ↑ again leaves it where it is.
  4. The draft, back. ↓ walks forward through the same lines, and one step past the newest returns what you were typing.

The same walk as a table:

You pressThe prompt shows
(nothing yet)fix the flaky
↑/clear
↑/afk off
↑/afk on
↑/afk on (nothing older, so it stays)
↓/afk off
↓/clear
↓fix the flaky, your own line back

Check it worked ​

  • The line in the editor is the one you wanted, and the status line offers enter start (or enter send, with a flow running).
  • A line brought back opens no completion list, so the arrows keep walking.

What goes in ​

Every line you send: a task that starts a flow, a word to one already running, an answer to a question, a command. A line the same as the one before it is kept once. What agents say is never in it, and neither is a task you gave hmz exec: your shell's history keeps that.

Which lines you walk ​

The lines you sent in this directory. A directory where you have sent nothing yet walks everything you have sent anywhere, so a new project still has something to go back through. Which of the two applies is settled when hmz starts, so send one line in a new project and it has its own history from the next start.

Variations ​

  • Several lines in the editor. In a prompt of several lines, ↑ walks back only from the first line and ↓ only from the last; anywhere else they move the cursor, as usual.
  • With a completion list open, the arrows move through the list instead. Press esc to put it away, then walk.
  • Send a task to another flow. Bring back a $ralph_loop … line and change the flow name: the task comes along.

Troubleshooting ​

↑ moves the cursor instead of walking ​

The cursor is not on the first line of a prompt of several lines, or a completion list is open. Move to the first line, or press esc.

A new project walks lines from other projects ​

Nothing has been sent in this directory yet, so the walk falls back to everything. Send one line here, and from the next hmz start it walks this directory's lines only.

A line I sent is missing ​

A line the same as the one before it is kept once. A task given to hmz exec is not kept: look in your shell's history.

Clearing it

History is one file, ~/.hmz/history.jsonl (under $HUMANIZE_HOME if you set that). Delete it to forget every line you have sent, everywhere. Nothing else is lost.

Next steps ​

  • Completion: finish a word instead of typing it.
  • Settings: the other thing kept between starts.
  • Exporting a run: for what actually happened in a run, not what you typed.

Released under the Apache-2.0 licence.