chriswalz / bit

Bit is a modern Git CLI
Apache License 2.0
6.05k stars 106 forks source link

bit info: sed regex fails on macOS #83

Closed CyberJack closed 3 years ago

CyberJack commented 3 years ago

The bit info command tries to fetch information about the status of submodules. The regex used fails on macOS when using the default available sed command.

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

This pull request updates the regex so that it works on macOS. It has has also been updated to be a bit shorter. The pattern abcdef may be written as a-f and 0-9 equals to \d.

The change has been tested using a new build on macOS and Arch Linux. Both have the same output.

chriswalz commented 3 years ago

@CyberJack LGTM