A structured-data shell in Gleam, inspired by Nushell
0

Configure Feed

Select the types of activity you want to include in your feed.

Fix Enter becoming j in Helix and other raw-mode TUIs.

Host stty sane left ICRNL on, so Enter was relayed as NL (0x0A). Crossterm
maps that to Ctrl+J / Char('j') in raw mode, breaking :wq. Disable ICRNL
while externals run so Enter stays CR.

author
nandi
date (Jul 26, 2026, 8:59 AM -0700) commit 15a1c61b parent 0de6f8e4 change-id nmtysqpr
+6 -1
+6 -1
src/gleshell_ffi.erl
··· 2724 2724 %% left on, Ctrl+C sits in the line buffer until Enter and our key 2725 2725 %% relay never sees it (external freezes; second ^C looks wedged) 2726 2726 %% - -echo: host must not echo keys we relay into the child PTY 2727 + %% - -icrnl: keep Enter as CR (0x0D). `sane` enables ICRNL, which turns 2728 + %% Enter into NL (0x0A). Relayed into a raw-mode child (hx/vim/…), 2729 + %% crossterm treats 0x0A as Ctrl+J → Char('j'), so `:wq` + Enter 2730 + %% inserts `j` instead of submitting the command. 2727 2731 _ = stty_run([ 2728 2732 "sane", 2729 2733 "-isig", ··· 2732 2736 "1", 2733 2737 "time", 2734 2738 "0", 2735 - "-echo" 2739 + "-echo", 2740 + "-icrnl" 2736 2741 ]), 2737 2742 ok. 2738 2743