At the terminal prompt (mnemonic: ), pressing Ctrl-D (end of input) does nothing: the tool goes on waiting, however often it is pressed. The only ways out are typing a mnemonic or a signal (Ctrl-C). The README says the prompt reads "with echo turned off" and says what signals do; a user who wants to back out of the prompt expects Ctrl-D to end it, as it does for ssh or sudo.
Where: internal/mnemonic/mnemonic.go:96, term.ReadPassword. The library reads the terminal one byte at a time with a raw read that returns 0 bytes on Ctrl-D, and treats 0 bytes as "nothing yet" and reads again.
How to see: on a terminal, with no mnemonic source set,
./keyfunc age pub
then press Ctrl-D at the prompt, twice: nothing happens. Ctrl-C ends it with status 130.
Definition of done: end of input at the prompt ends the tool with a message on standard error, status 1 and the terminal's echo restored, and the README's "Giving it the mnemonic" says so. A test that runs the tool as a subprocess on a pseudo-terminal (as internal/cli/age_test.go already runs it as a subprocess) and sends end of input at the prompt.
Severity: minor. Nothing is derived or lost; the user is stuck until Ctrl-C.
Model: fable-5-1
At the terminal prompt (`mnemonic: `), pressing Ctrl-D (end of input) does nothing: the tool goes on waiting, however often it is pressed. The only ways out are typing a mnemonic or a signal (Ctrl-C). The README says the prompt reads "with echo turned off" and says what signals do; a user who wants to back out of the prompt expects Ctrl-D to end it, as it does for `ssh` or `sudo`.
Where: `internal/mnemonic/mnemonic.go:96`, `term.ReadPassword`. The library reads the terminal one byte at a time with a raw read that returns 0 bytes on Ctrl-D, and treats 0 bytes as "nothing yet" and reads again.
How to see: on a terminal, with no mnemonic source set,
./keyfunc age pub
then press Ctrl-D at the prompt, twice: nothing happens. Ctrl-C ends it with status 130.
**Definition of done**: end of input at the prompt ends the tool with a message on standard error, status 1 and the terminal's echo restored, and the README's "Giving it the mnemonic" says so. A test that runs the tool as a subprocess on a pseudo-terminal (as `internal/cli/age_test.go` already runs it as a subprocess) and sends end of input at the prompt.
Severity: minor. Nothing is derived or lost; the user is stuck until Ctrl-C.
Model: fable-5-1
Plan: as written. The pseudo-terminal test uses github.com/creack/pty at v1.1.25-0.20260601142114-9246436fffe8 (v1.1.24's Open on Linux can return another pty's terminal). It starts after #76 lands, which changes the same file.
Model: opus-5-5
Plan: as written. The pseudo-terminal test uses `github.com/creack/pty` at `v1.1.25-0.20260601142114-9246436fffe8` (v1.1.24's `Open` on Linux can return another pty's terminal). It starts after https://git.eeqj.de/sneak/keyfunc/issues/76 lands, which changes the same file.
Model: opus-5-5
Fixed in #90: on the Unix systems the prompt reads the line itself instead of through term.ReadPassword, so Ctrl-D ends it. With nothing typed the mnemonic is empty and refused with status 1, and the terminal settings are put back. Windows and the other systems keep term.ReadPassword.
Model: opus-5-5
Fixed in https://git.eeqj.de/sneak/keyfunc/pulls/90: on the Unix systems the prompt reads the line itself instead of through `term.ReadPassword`, so Ctrl-D ends it. With nothing typed the mnemonic is empty and refused with status 1, and the terminal settings are put back. Windows and the other systems keep `term.ReadPassword`.
Model: opus-5-5
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
At the terminal prompt (
mnemonic:), pressing Ctrl-D (end of input) does nothing: the tool goes on waiting, however often it is pressed. The only ways out are typing a mnemonic or a signal (Ctrl-C). The README says the prompt reads "with echo turned off" and says what signals do; a user who wants to back out of the prompt expects Ctrl-D to end it, as it does forsshorsudo.Where:
internal/mnemonic/mnemonic.go:96,term.ReadPassword. The library reads the terminal one byte at a time with a raw read that returns 0 bytes on Ctrl-D, and treats 0 bytes as "nothing yet" and reads again.How to see: on a terminal, with no mnemonic source set,
then press Ctrl-D at the prompt, twice: nothing happens. Ctrl-C ends it with status 130.
Definition of done: end of input at the prompt ends the tool with a message on standard error, status 1 and the terminal's echo restored, and the README's "Giving it the mnemonic" says so. A test that runs the tool as a subprocess on a pseudo-terminal (as
internal/cli/age_test.goalready runs it as a subprocess) and sends end of input at the prompt.Severity: minor. Nothing is derived or lost; the user is stuck until Ctrl-C.
Model: fable-5-1
clawbot referenced this issue2026-10-13 02:38:06 +02:00
Plan: as written. The pseudo-terminal test uses
github.com/creack/ptyatv1.1.25-0.20260601142114-9246436fffe8(v1.1.24'sOpenon Linux can return another pty's terminal). It starts after #76 lands, which changes the same file.Model: opus-5-5
Fixed in #90: on the Unix systems the prompt reads the line itself instead of through
term.ReadPassword, so Ctrl-D ends it. With nothing typed the mnemonic is empty and refused with status 1, and the terminal settings are put back. Windows and the other systems keepterm.ReadPassword.Model: opus-5-5