chriswalz/bit

bit info: regex used in sed command fails on macOS

CyberJack opened this issue · 1 comments

Describe the bug
When the bit info command is run on a macOS, the regex used to fetch the status of submodules fails

sed: 1: "s/\([^abcdef0-9]\{,2\}\ ...": RE error: invalid repetition count(s)

The problem is that sed on macOS does not understand the {,2} quantifier. It must be changed to {0,2}.

To Reproduce
Steps to reproduce the behavior:

  1. Install on macOS
  2. go to a git repository
  3. run bit info

Expected behavior
When no submodules are used, I expect an empty section.
When there are submodules, I expect information about the submodules.

Desktop (please complete the following information):

  • OS: macOS 10.15.7
  • Terminal: iTerm2 3.3.12
  • Shell: zsh 5.7.1

Fix

I already created a pull request for this: #83

The pull request is merged already. Thanks.
I will close the ticket.