small software-rendered rust tty
add terminfo
| -rw-r--r-- | pattypan.terminfo | 120 | ||||
| -rw-r--r-- | src/main.rs | 5 |
2 files changed, 124 insertions, 1 deletions
diff --git a/pattypan.terminfo b/pattypan.terminfo new file mode 100644 index 0000000..1c9f25f --- /dev/null +++ b/pattypan.terminfo @@ -0,0 +1,120 @@ +pattypan|patty, + Su, + Tc, + XF, + am, + ccc, + fullkbd, + hs, + km, + mc5i, + mir, + msgr, + npc, + xenl, + colors#256, + cols#80, + it#8, + lines#24, + pairs#32767, + BD=\E[?2004l, + BE=\E[?2004h, + bel=^G, + bold=\E[1m, + cbt=\E[Z, + clear=\E[H\E[2J, + cr=^M, + csr=\E[%i%p1%d;%p2%dr, + cub=\E[%p1%dD, + cub1=^H, + cud=\E[%p1%dB, + cud1=^J, + cuf=\E[%p1%dC, + cuf1=\E[C, + cup=\E[%i%p1%d;%p2%dH, + cuu=\E[%p1%dA, + cuu1=\E[A, + dch=\E[%p1%dP, + dch1=\E[P, + dim=\E[2m, + dl=\E[%p1%dM, + dl1=\E[M, + ech=\E[%p1%dX, + ed=\E[J, + el=\E[K, + el1=\E[1K, + fd=\E[?1004l, + fe=\E[?1004h, + fsl=^G, + home=\E[H, + hpa=\E[%i%p1%dG, + ht=^I, + hts=\EH, + ich=\E[%p1%d@, + il=\E[%p1%dL, + il1=\E[L, + ind=^J, + indn=\E[%p1%dS, + ka1=, + ka3=, + kbeg=\EOE, + kbs=\177, + kc1=, + kc3=, + kcbt=\E[Z, + kcub1=\EOD, + kcud1=\EOB, + kcuf1=\EOC, + kcuu1=\EOA, + kdch1=\E[3~, + kend=\EOF, + kf1=\EOP, + khome=\EOH, + kich1=\E[2~, + kind=\E[1;2B, + kmous=\E[M, + knp=\E[6~, + kpp=\E[5~, + kri=\E[1;2A, + kund=, + kxIN=\E[I, + kxOUT=\E[O, + oc=\E]104\007, + op=\E[39;49m, + rc=\E8, + rep=%p1%c\E[%p2%{1}%-%db, + rev=\E[7m, + ri=\EM, + rin=\E[%p1%dT, + ritm=\E[23m, + rmacs=\E(B, + rmam=\E[?7l, + rmcup=\E[?1049l, + rmir=\E[4l, + rmkx=\E[?1l, + rmso=\E[27m, + rmul=\E[24m, + rmxx=\E[29m, + rs1=\E]\E\\\Ec, + sc=\E7, + setab=\E[%?%p1%{8}%<%t4%p1%d%e%p1%{16}%<%t10%p1%{8}%-%d%e48;5;%p1%d%;m, + setaf=\E[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;m, + setrgbb=\E[48:2:%p1%d:%p2%d:%p3%dm, + setrgbf=\E[38:2:%p1%d:%p2%d:%p3%dm, + sgr=%?%p9%t\E(0%e\E(B%;\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;%?%p7%t;8%;m, + sgr0=\E(B\E[m, + sitm=\E[3m, + smacs=\E(0, + smam=\E[?7h, + smcup=\E[?1049h, + smir=\E[4h, + smkx=\E[?1h, + smso=\E[7m, + smul=\E[4m, + smxx=\E[9m, + tbc=\E[3g, + tsl=\E]2;, + u6=\E[%i%d;%dR, + u7=\E[6n, + u8=\E[?%[;0123456789]c, + vpa=\E[%i%p1%dd,
\ No newline at end of file diff --git a/src/main.rs b/src/main.rs index 460616c..3e8f8dd 100644 --- a/src/main.rs +++ b/src/main.rs @@ -38,7 +38,10 @@ fn spawn(shell: &str) -> Result<(OwnedFd, Pid)> { let x = unsafe { forkpty(None, None)? }; match x { ForkptyResult::Child => { - _ = Command::new(shell).env("TERM", "xterm").spawn()?.wait(); + _ = Command::new(shell) + .env("TERM", "pattypan") + .spawn()? + .wait(); exit(0); } ForkptyResult::Parent { child, master } => { |