Most active commenters
  • SeeManDo(4)
  • seba_dos1(3)
  • hinkley(3)
  • dylan604(3)

←back to thread

225 points attogram | 19 comments | | HN request time: 0.815s | source | bottom

A github project to collect a bunch of bash-based screensavers/visualizations.
1. alejoar ◴[] No.45731748[source]
Doesn't work for me on MacOS:

I get "mapfile: command not found"

replies(5): >>45731825 #>>45731919 #>>45733380 #>>45733582 #>>45736773 #
2. SeeManDo ◴[] No.45731825[source]
Same here
replies(1): >>45731837 #
3. SeeManDo ◴[] No.45731837[source]
Bash Screensavers v0.0.27 (Mystic Shine)

./screensaver.sh: line 79: mapfile: command not found 1 .

(Press ^C to exit)

Choose your screensaver: 1 404 Screensaver Not Found:

Oh no! Screensaver had trouble! Error code: 1

replies(2): >>45731944 #>>45732065 #
4. ◴[] No.45731919[source]
5. seba_dos1 ◴[] No.45731944{3}[source]
Get a Bash that's not ancient. mapfile is there since version 4.0 from 2009.
replies(1): >>45732195 #
6. SeeManDo ◴[] No.45732065{3}[source]
Seems to be a old version of bash installed and used by default on macos
replies(1): >>45732161 #
7. SeeManDo ◴[] No.45732161{4}[source]
Even after updating still getting the same error

checked active bash version:

echo $BASH_VERSION

5.3.3(1)-release

replies(1): >>45732400 #
8. ◴[] No.45732195{4}[source]
9. seba_dos1 ◴[] No.45732400{5}[source]
What's relevant is whether "/usr/bin/env bash" runs the correct one.
replies(1): >>45738395 #
10. 30minAdayHN ◴[] No.45733380[source]
I encountered this in another project. This should hopefully fix it:

zmodload zsh/mapfile

11. doodpants ◴[] No.45733582[source]
After installing bash via MacPorts, it works for me. All except #3 cutesaver, which gives an infinite loop of:

  cutesaver.sh: line 55: shuf: command not found
replies(1): >>45733851 #
12. seba_dos1 ◴[] No.45733851[source]
shuf has been a part of coreutils since 2006.
13. hinkley ◴[] No.45736773[source]
IIRC macOS is at least one major version behind in bash.
replies(1): >>45738340 #
14. dylan604 ◴[] No.45738340[source]
something something licensing something something

new installs default to bash not being the default terminal. someone else mentioned macports, but there's a new version available via brew as well

replies(1): >>45739348 #
15. kridsdale3 ◴[] No.45738395{6}[source]
I used "brew install bash && brew info bash" to get the path, then ran that shell (zsh doesn't work), then inside that new bash, ran the screensaver app.

I found the 4k fullscreen perf in iTerm2 to be not-great, so I did it again in the kitty (GPU powered) terminal macos app, and it was good.

16. hinkley ◴[] No.45739348{3}[source]
So far I have resisted the change. All the people I know who think zsh is great have a fairly large number of addons to get it that way.
replies(1): >>45739501 #
17. dylan604 ◴[] No.45739501{4}[source]
This first time I used a mac where zsh was the default, I was confused for quite a bit of time when it would not run something I was used to doing. I kept looking up errors on the internet until I came across someone's post with a reply asking if they were using Terminal on a new OS X. Sure enough, this was a new mac as well. Now I know one of the first steps for me with a new Mac is change default shell. I'm way too old and set in my ways to care to learn a new shell. Choosing a shell, IDE, font, etc are games for youth.
replies(1): >>45739758 #
18. hinkley ◴[] No.45739758{5}[source]
I learned to consistently use shebangs at the top of scripts while working with the first zsh user I knew. Or might have been fish. No i think he started in zsh and moved to fish. Every time I forgot, his environment was busted. And he sat a cubicle and a half away from me, so I got fast feedback.
replies(1): >>45739934 #
19. dylan604 ◴[] No.45739934{6}[source]
Just last week I found myself trying to explain shebang to someone that knows nothing of coding, command line interfaces, or what shells are. At one point, I was wondering where it was I should have stopped talking, but it was definitely well before I finished.