Strip '+ ' decoration in git branch list (#5016)

- '+' is the prefix for the current branch in some worktree

Closes #5014
This commit is contained in:
Matteo Bertini 2022-03-28 23:07:55 +02:00 committed by GitHub
parent 0afa18ac4a
commit a2872b4ccc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -61,7 +61,7 @@ module completions {
#
# This is a simplified version of completions for git branches and git remotes
def "nu-complete git branches" [] {
^git branch | lines | each { |line| $line | str find-replace '\* ' '' | str trim }
^git branch | lines | each { |line| $line | str find-replace '[\*\+] ' '' | str trim }
}
def "nu-complete git remotes" [] {