git-info: fix regex for bsd sed

This commit is contained in:
spacewander 2020-09-24 23:10:23 +08:00
parent 65be1e5f8f
commit 2e610158a8

View file

@ -34,7 +34,7 @@ most_recent_commit() {
submodules() {
# short sha1
git submodule status | sed 's/\([^abcdef0-9]\{,2\}\)\([abcdef0-9]\{7\}\)\([abcdef0-9]\{33\}\)\(.*\)/\1\2\4/'
git submodule status | sed 's/\([^abcdef0-9]\{0,2\}\)\([abcdef0-9]\{7\}\)\([abcdef0-9]\{33\}\)\(.*\)/\1\2\4/'
}
local_branches() {