Veteran: "You should apt-get install sl." Newbie: "What does sl do?" Veteran: (perfectly straight face) "It trains you."
Sl: a steam locomotive in your terminal
41–50 of 58 posts
Re: Sl: a steam locomotive in your terminal
#42When a colleague accidentally types their password to our cluster into a chat window, the first thing I do is login as them and alias ls=sl. Another fun one is to add `telnet towel.blinkenlights.nl` to their .bashrc, so on login they get to watch ascii star wars.
Re: Sl: a steam locomotive in your terminal
#43> The following code changes the default behaviour of ls from listing > files to turning your terminal into an unstoppable steam locomotive. > The only way to end it is closing the terminal, so use this with caution. erm, that's easily stopped: [ctrl]+z $ pkill -9 sl
erm, no? "while true; sl; done"
zsh: suspended while true; do sl; done
?Re: Sl: a steam locomotive in your terminal
#44> The following code changes the default behaviour of ls from listing > files to turning your terminal into an unstoppable steam locomotive. > The only way to end it is closing the terminal, so use this with caution. erm, that's easily stopped: [ctrl]+z $ pkill -9 sl
^Z will just suspend `sl`, at which point bash will immediately launch another copy. That's what the loop is for.
Re: Sl: a steam locomotive in your terminal
#45Earlier quoted context omitted.
^Z will just suspend `sl`, at which point bash will immediately launch another copy. That's what the loop is for.
Have you actually tried it? In neither zsh nor bash does this seem to actually be the case.
But it looks like you're right. I just tried `while true; do ( echo hi; sleep 1; echo bye; ); done` and ^Z does stop the cycle.
Re: Sl: a steam locomotive in your terminal
#46Re: Sl: a steam locomotive in your terminal
#47Earlier quoted context omitted.
Have you actually tried it? In neither zsh nor bash does this seem to actually be the case.
Well no, because I didn't want to install `sl`. But it looks like you're right. I just tried `while true; do ( echo hi; sleep 1; echo bye; ); done` and ^Z does stop the cycle.
With zsh when I resume the execution it continues looping. However with bash it resumes for only one more iteration.
Re: Sl: a steam locomotive in your terminal
#48When a colleague accidentally types their password to our cluster into a chat window, the first thing I do is login as them and alias ls=sl. Another fun one is to add `telnet towel.blinkenlights.nl` to their .bashrc, so on login they get to watch ascii star wars.
... and if you unset telnet's escape char, they will watch it to the end.
Re: Sl: a steam locomotive in your terminal
#49Earlier quoted context omitted.
Well no, because I didn't want to install `sl`. But it looks like you're right. I just tried `while true; do ( echo hi; sleep 1; echo bye; ); done` and ^Z does stop the cycle.
Interestingly, at least how I have zsh configured and don't have bash configured, the behavior of `fg` after suspending these is different. With zsh when I resume the execution it continues looping. However with bash it resumes for only one more iteration.