Skip to content

Comments

MacOS & ZSH support #2

Open
btraas wants to merge 3 commits intoceremcem:masterfrom
btraas:macos-zsh
Open

MacOS & ZSH support #2
btraas wants to merge 3 commits intoceremcem:masterfrom
btraas:macos-zsh

Conversation

@btraas
Copy link

@btraas btraas commented Mar 16, 2021

MacOS / BSD:

  • No realpath command (created alternative function my_realpath)
  • No -printf flag on find (replaced with GNU shell parameter expansion, compatible with BSD and ZSH)
  • No readarray command (created array in a loop instead)

ZSH:

  • Special characters for regex not allowed in shell (wrapped in double quotes)

Tested on macOS/ZSH and Linux/Bash

@ceremcem
Copy link
Owner

I think we need to add appropriate tests for these. My first question: Were you able to run the tests and see any of them failed? If yes, do they pass now? If no, you should have created failing test first.

@btraas
Copy link
Author

btraas commented Mar 16, 2021

Seeing as there's no additional functionality, and the script fails on macOS (without these changes), the existing tests:

I can add more if you like, what were you wanting to test?

FWIW, I also fixed an issue that caused tests (on master) to produce false negatives on different machines due to locale sorting).

Running tests on Linux (master)
image

Running tests on macOS (master)
image

Running tests on macOS (this PR - #2 )
image

Running tests on linux (this PR - #2)
image

@ceremcem
Copy link
Owner

Nice!

@ceremcem
Copy link
Owner

FYI: I'll test and merge ASAP.

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

Successfully merging this pull request may close these issues.

2 participants