mirror of
https://github.com/nushell/nu_scripts.git
synced 2024-09-11 13:45:56 +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
|
| str trim
|
||||||
| find --regex 'HEAD .*?[:: ].+'
|
| find --regex 'HEAD .*?[:: ].+'
|
||||||
| first
|
| first
|
||||||
| str replace 'HEAD .*?[:: ](.+)' '$1'
|
| str replace --regex 'HEAD .*?[:: ]\s*(.+)' '$1'
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
|
Loading…
Reference in New Issue
Block a user