mirror of
https://github.com/nushell/nu_scripts.git
synced 2024-08-17 09:20:28 +03:00
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:
parent
ab5f40b59c
commit
c4db8e6dee
@ -8,7 +8,7 @@ def git_main_branch [] {
|
||||
| str trim
|
||||
| find --regex 'HEAD .*?[:: ].+'
|
||||
| first
|
||||
| str replace 'HEAD .*?[:: ](.+)' '$1'
|
||||
| str replace --regex 'HEAD .*?[:: ]\s*(.+)' '$1'
|
||||
}
|
||||
|
||||
#
|
||||
|
Loading…
Reference in New Issue
Block a user