pipetty(1)

πŸ’– pipetty β€” the manual, but make it cute πŸ’–

okay so bestie, you found pipetty(1), and it lives in the General Commands Manual section 1, which is where all the good command-line girls hang out. let's get into it ✨


🌸 NAME 🌸

pipetty β€” a tool to pipe from a pseudoterminal πŸŽ€

like. the whole vibe. that's it. that's the name section. slay.


✨ SYNOPSIS ✨

pipetty command [ args... ]

that's literally it. you give it a command and then whatever args that command needs. no cap. 🫢


πŸ’… DESCRIPTION πŸ’…

pipetty lets you make a program unaware that its output is being redirected. the way that works is it hands the program a pseudoterminal so the program thinks it's talking to a real terminal, and it never clocks that you're piping it somewhere. πŸ’–

this is usually useful for tools that detect whether they're run from a terminal and modify their output, typically colorizing it only when run interactively. you know the ones. the divas. they check isatty() and the second it says "nah", the colors vanish and everything turns into sad grey text. 😭

usually, disabling colors when redirected is a good thing as most tools can't cope with ANSI codes. fr fr β€” most things choke on escape sequences and you end up with ^[[31m nonsense all over your terminal. so the default behaviour is actually being polite. 🧚

use pipetty when you do want colors, like when you're going to feed that output to ansi2html or less -R. because those two can absolutely handle the ANSI codes and honestly the colors are the whole point. ⭐


πŸ‘‘ CAVEATS πŸ‘‘

certain programs, such as bash, don't quite like their stdin to be on a different terminal than stdout. 🫠

so like. be a little careful. some programs are picky about where their stdin lives versus their stdout, and pipetty does the pseudoterminal thing, so some of them will lowkey have a moment about it. it's giving "why is my input coming from a different terminal than my output" and bash is not amused. πŸ’€


🌈 SEE ALSO 🌈

  • ansi2html(1) β€” feed it colors, get HTML πŸŽ€
  • ansi2txt(1) β€” feed it colors, get plain text πŸ¦‹
  • less(1) β€” the classic, and -R is your bestie here πŸ’œ

and that's the whole page, bestie!! you ate. πŸ’…βœ¨

this one came from the General Commands Manual and it's dated 2016-06-25 β€” iconic, historic, timeless. πŸŽ€

kisses, go pipe something pretty πŸ’–πŸŒˆπŸ‘‘