mirror of
https://github.com/RGBCube/nu_scripts
synced 2025-08-01 14:47:47 +00:00
Fix git checkout/switch completions (#359)
This commit is contained in:
parent
e89b4ac6be
commit
6801071f50
1 changed files with 1 additions and 1 deletions
|
@ -6,7 +6,7 @@ def "nu-complete git switchable branches" [] {
|
|||
let remotes_regex = (["(", ((nu-complete git remotes | each {|r| ['remotes/', $r, '/'] | str join}) | str join "|"), ")"] | str join)
|
||||
^git branch -a
|
||||
| lines
|
||||
| parse -r (['^[\* ]+', $remotes_regex, '?(?P<branch>\w+)'] | flatten | str join)
|
||||
| parse -r (['^[\* ]+', $remotes_regex, '?(?P<branch>\S+)'] | flatten | str join)
|
||||
| get branch
|
||||
| uniq
|
||||
| where {|branch| $branch != "HEAD"}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue