Suggestion about new feature for Crystal language

Hi, I just would like, accordance to this topic I made in the past, to suggest to add the setproctitle support.

Do you know if actually an external project for Crystal implement that ?

Assuming you’re in an ANSI-compatible terminal (like pretty much any Linux or OSX terminal), and it supports XTerm stuff (most do), you can just output an ANSI control sequence. This won’t change the name in things like the output of ps, but it will change the title shown in your terminal as long as it supports that sequence.

title = "Neat Program Title"
STDOUT << "\e]0; #{title}\e\\"

If you really want a library for this, then my personal libremiliacr library can do it.


Oh thanks a lot !

1 Like