mirror of
https://github.com/RGBCube/nu_scripts
synced 2025-08-03 07:37:47 +00: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
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue