Post A4R89g0AXOj3plHFEO by brennen@mastodon.social
(DIR) More posts by brennen@mastodon.social
(DIR) Post #A4R2jmberMGj1Ae7I8 by CarlCravens@mastodon.xyz
2021-02-19T14:59:44Z
1 likes, 1 repeats
Command shell thoughts. Ever think about how when you start with a fresh shell, your cursor is at the top line. Then as you work, your focus moves down the screen until you're working on the last line. But you clear the screen and it starts over. You can see the legacy reason it does this (hardware terminals), but why does it still do this today? Why not have clear-screen reset to the bottom line?alias clear='clear;tput cup $LINES 0'If only I could get ^L to do this too.
(DIR) Post #A4R3IQemSZ4R4scwNM by CarlCravens@mastodon.xyz
2021-02-19T15:06:00Z
1 likes, 0 repeats
FWIW, I've been using that alias for over 20 years. People I'm tutoring ask why I bother typing `clear` instead of using ^L. And I'm like, "Let me tell you a story." 😆
(DIR) Post #A4R4S6xucuvAr7kyB6 by jfred@mastodon.sdf.org
2021-02-19T15:18:57Z
0 likes, 0 repeats
@CarlCravens bindkey -s '^L' '^Uclear;tput cup $LINES 0^M'If you're using zsh, which you might not be, but... should be doable in bash too :P
(DIR) Post #A4R4br7iNheGcQzKJU by CarlCravens@mastodon.xyz
2021-02-19T15:20:44Z
0 likes, 0 repeats
@jfred I'm too old for zsh. Newfangled shells are a young man's game.
(DIR) Post #A4R7QwU2PcM7v5uvey by jfred@mastodon.sdf.org
2021-02-19T15:52:21Z
0 likes, 0 repeats
@CarlCravens Out of curiosity I looked up when the first zsh release was... 31 years ago!Honestly these days I mostly use it out of apathy, I already have to adjust to macOS for work and it's now the default there... still use bash on all my personal Linux machines
(DIR) Post #A4R89g0AXOj3plHFEO by brennen@mastodon.social
2021-02-19T16:00:27Z
0 likes, 0 repeats
@CarlCravens oh, that's clever.on thinking about it, i don't know whether it would work better for me or not, but it's sort of striking that i never really thought about it until now.
(DIR) Post #A4T8UaHxMXfWVpUEKG by CarlCravens@mastodon.xyz
2021-02-20T15:13:40Z
0 likes, 0 repeats
@jfred Weird how long it can take some things to get popular. But I'm not using a Mac, and I've been using Bash for so long and it does the job I want it to do, so I haven't bothered looking at changing.