fix: missing regex flag (#712)

- `str replace` for git main branch alias is missing regex flag
- also missing removal of leading white space
This commit is contained in:
Robbie Nohra 2023-12-22 09:53:54 -05:00 committed by GitHub
parent ab5f40b59c
commit c4db8e6dee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -8,7 +8,7 @@ def git_main_branch [] {
| str trim
| find --regex 'HEAD .*?[: ].+'
| first
| str replace 'HEAD .*?[: ](.+)' '$1'
| str replace --regex 'HEAD .*?[: ]\s*(.+)' '$1'
}
#