13 ms·
Show HN: Paclear – A Fun Twist on the 'Clear' Command with Pac-Man Animation
Delight your terminal with paclear, a whimsical take on the 'clear' command accompanied by a PAC-MAN animation. It's a fun way to clear your terminal screen and enjoy a bit of nostalgia at the same time.
- lionkor 3y agoi wish it came in from the left instead of spawning on screen!
- ocharles 3y agoYea, it needs to go fully off screen too!
- mysterydip 3y agoThe animations made me laugh. I love silly little projects like this. It's the kind of thing I would simlink to clear and forget about. Then one frustrating day of coding, I'd clear the screen and see the chomping go by and lift my mood just a bit.
- ramon156 3y agoFade-in and -out, size support and I'd totally use this!
- reportgunner 3y agoI expected a small pacman going line by line, character by character.
- notpushkin 3y agoEven better if you could control the pacman!
- omneity 3y agoSame, but then it could also be too slow or unpleasant to look at. Maybe a smaller pacman that eats multiple lines at once? Either way it's a pretty cool idea and execution, well done OP :)
- reportgunner 3y agoOr maybe multiple speedy pacmen ? :)
- classichasclass 3y agoppacman: parallel pacman clear
- raffraffraff 3y agoThat might work for clearing a single word before the cursor (ctrl+w) or clearing from cursor to the end of the line (ctrl+k) etc
- doctor_phil 3y agoAnother similarly whimsical command is `sl`. (purportedly a common mistyping of ls) https://github.com/mtoyoda/sl https://github.com/mtoyoda/sl
- fsniper 3y agoOnce I built a patch for sl for typos for cat as "car". https://github.com/fsniper/sl-patch https://github.com/fsniper/sl-patch
- Tijdreiziger 3y agoThere’s also ‘gti’: https://www.cyberciti.biz/linux-news/linux-unix-desktop-fun-gti-get-jeep-car-when-you-mistype-git/ https://www.cyberciti.biz/linux-news/linux-unix-desktop-fun-...
- fsniper 3y agoThat's really cool
- happyrock 3y agoAlways loved the `man` page for `sl: "BUGS - It sometimes lists directory contents."
- LorenDB 3y agoHilarious!
- YoshiRulz 3y agoI was able to override ^L (in BASH, at least) with this ~/.inputrc[1]: "\f": "\C-upaclear -cyellow -s5\C-m" ...though the experience isn't great, which I blame Konsole for. (It also adds to shell history, where the builtin obviously does not.) [1]: https://ss64.com/bash/syntax-inputrc.html https://ss64.com/bash/syntax-inputrc.html
- deleted 3y ago[deleted]
- ksherlock 3y agoFor bash, if `$HISTCONTROL` is `ignoreboth` or `ignorespace`, commands with a leading space are not added to the history, so you could try that as a workaround.
- cantSpellSober 3y agoThis is actually useful for teaching, thank you! Sometimes junior devs get confused seeing the clear command at work, thinking I opened a new terminal window. Having a small (fun!) animation actually makes it, um, clearer what's happening.
- JoshTriplett 3y ago> Sometimes junior devs get confused seeing the clear command at work, thinking I opened a new terminal window. I don't tend to type `clear`; I just press Ctrl-L, which clears the screen if typed at the start of a prompt. Quicker, and doesn't leave `clear` commands in your history.
- cantSpellSober 3y agoYep, same problem there, I have to explain why the screen is empty. Clear UI informs the user when the information has changed. When I'm presenting they can't see me press a command, but they can see a fun Pac-Man.
- biztos 3y agoGreat job! Suggestion: make the Pac-Man have a fill color, yellow by default in color mode.
- petepete 3y agoI'm amazed when I see people type clear when ctrl+l has been around for decades.
- bkallus 3y agoIn Alacritty, ctrl-l clears the screen but does not clear the scrollback buffer. Clear also clears the scrollback buffer. This is useful for running programs with lots of output containing escape codes that may get mangled by less; just run the program and press shift-home to scroll to the top of the buffer.
- petepete 3y agoI have ctrl+k bound to clear the scrollback buffer in tmux, it's rare I use it but handy.
- JohnFen 3y agoI've been typing "clear" for so long that it would take longer for me to think to override my muscle memory and use ctrl-l instead, and the time saved isn't enough to bother retraining myself on this. Also, ctrl-l isn't universal, but "clear" very nearly is.
- petepete 3y agoOut of interest, where doesn't ctrl-l work? I only use Linux these days and readline's ubiquity means it's pretty much everywhere I go.
- JohnFen 3y agoI was thinking of operating systems I use aside from the Unices or Windows, such as VMS, z/OS, etc. But now that I consider it, I don't know for a fact that Ctrl-l doesn't work with standard terminal programs in other OSes. I just assumed it generally won't. So, grain of salt and all that.
- 3y ago
- jerf 3y ago"I've crated paclear in compliance with the official fan-made policy of Pac-Man. https://www.pacman.com/jp/policy/fanmade.php https://www.pacman.com/jp/policy/fanmade.php " Well, unless you speak fluent Japanese to the point you can read lawyer-speak in it, you'll need to translate that, but it is surprisingly sensible. Worth a glance if you're into IP issues. I'm impressed.
- kej 3y agoI like the part about not infringing on BANDAI NAMCO Entertainment's honor. Going to start including that in my licenses. Google translate link for the curious: https://www-pacman-com.translate.goog/jp/policy/fanmade.php?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en&_x_tr_pto=wapp https://www-pacman-com.translate.goog/jp/policy/fanmade.php?...
- vore 3y agoIt’s kind of a goofy translation of 名誉 in that context, it’s probably less silly to translate it as “prestige”.
- thesuitonym 3y agoThis is so stupid and pointless. I love it!
- kylegalbraith 3y agoI wish it would adjust to the height of my terminal and do it all in one go instead of jumping down line breaks.
- pjmq 3y agoCongrats on making it to the front page of The Verge! https://www.theverge.com/2023/10/24/23930133/paclear-c-yellow-wagga-wagga-wagga https://www.theverge.com/2023/10/24/23930133/paclear-c-yello...
- AbraKdabra 3y ago"I've crated paclear in compliance with the official fan-made policy of Pac-Man." Nintendo needs to learn a lot from this.
- javier_e06 3y agoFun on the bun. Looking forward for future release with sound option, wacka, wacka, wacka. Thanks.
- jrmg 3y agoCriticism from a place of love (This is such a great, whimsical idea!): In the videos on the page, the Pac-Man starts completely on-screen, obliterating the content in one go, and proceeds to the right, and disappears as soon as it touches the right edge of the window. The effect would be so much better if the Pac-Man started 'off-the-left', and came in column-by-column, not obliterating any content until it was covered by its body, and proceeded rightward until it was completely off screen. To put it another way, this looks like the content is cleared, a Pac-Man is teleported in on the left, moves right, and is teleported out. It would be better if the terminal appeared sort of like a window that the Pac-Man passes through, obliterating the content only when it’s underneath the Pac-Man. I hope I’m making sense!
- orangekame3 3y agoHello everyone, I'm the creator of paclear. Thank you for all the comments and stars. Your feedback here is invaluable, and I plan to incorporate it into future updates. I would also like to extend my deepest gratitude to Bandai Namco for publishing the official fan-made policy of Pac-Man, which made this project possible. Thank you all for your support!