Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pretty broken in OSX #62

Open
darkvertex opened this issue Mar 28, 2021 · 3 comments
Open

Pretty broken in OSX #62

darkvertex opened this issue Mar 28, 2021 · 3 comments

Comments

@darkvertex
Copy link
Contributor

I use Pureline on Linux and WSL shells all the time but I recently tried to deploy it on an OSX box I ssh to sometimes and it's completely broken. :(

If it helps, my default shell is Bash (version 3.2.57), running on Darwin 20.3.0 (aka Big Sur), using the latest "main" branch:

alan@hitchcock:~$  source $HOME/repos/pureline/pureline
-bash: declare: -A: invalid option
declare: usage: declare [-afFirtx] [-p] [name[=value] ...]
-bash: declare: -A: invalid option
declare: usage: declare [-afFirtx] [-p] [name[=value] ...]
\e]2;'\u@\h: \w' alan@hitchcock ↔ ~ ↔

I guess it's probably because the Bash bundled with OSX is very old, maybe:

alan@hitchcock:~$ bash --version
GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin20)
Copyright (C) 2007 Free Software Foundation, Inc.

(My WSL Ubuntu environment where Pureline works perfectly has Bash 4.2 copyright 2011, for comparison.)

@chris-marsh
Copy link
Owner

Yes, PureLine needs Bash v4 minimum bescause it uses associative arrays. The issue was first mentionein in Issue 7. I don't have access to OSX, but from what I read, bash can be upgraded using Homebrew. I know its not a perfect solution.

It does niggle me that PureLine does not work without effort on OSX, but since bash is now at v5.1+ I'm somewhat reluctant to put time into compatibilty with v3.2. Especially when v4 has been out for 12 years being released in 2009.

@darkvertex
Copy link
Contributor Author

I hear ya. I too was surprised that OSX's bundled Bash is from 2007. You'd think they'd refresh it a little. 🤷‍♂️

You can close this issue if you want. I understand it's a bit of an undertaking to support such an old version of Bash.

Could you at the very least add a line in the INSTALL section of your main README to mention "Bash version 4+ is required."? I think it'll help prevent further "it's broken!" tickets like mine.

@ls-1N
Copy link

ls-1N commented Mar 8, 2023

Part of the reason why bash is so old on macOS might be because they are trying to force a migration to zsh.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants