#17 Untested zsh -> bash port.
Closed by tibbs. Opened by jsh.
jsh/quick-fedora-mirror direct-translation  into  master

Download 17.patch

There aren't tests, and I haven't had any experience mirroring Fedora.
(Besides. I made the changes on a Mac, with homebrew as my package manager, so my bash 4 is bash 4.3, in /usr/local/bin, which isn't what the target users expect.)

I just did a direct translation of zsh associative-array syntax to bash aa-syntax, and threw in a check for the bash version number (must be >= 4) at the beginning.

This is great, thanks!

I'm not going to merge this as-is because I'm still developing and don't want to worry about the overhead of adapting to bash syntax at the same time, However, it will br incredibly useful as a guide.

An interesting point is that RHEL5 doesn't have bash4, so doing this actually reduces portability to those systems. It may be better for me to eliminate the associative array altogether (there's onky one) and aork around the lack of ${(P)foo} or local -n foo in the one function where it's used. But I don't know if bash3 is missing something else which would make that work wasted.

Writing in shell is a pain either way, I guess.

Any developments on this?

I'm not really interested in porting this to bash at this point. As far as I know there's simply no way to duplicate multios, and porting to bash has very little practical gain.

Pull-Request has been closed by tibbs

Metadata