Fix git Command Completion Not Working After 2.18.0
- "git help -a|egrep '^ [a-zA-Z0-9]'" returns empty in "__git_commands" function - Used git --list-cmds introduced in git v2.18.0 as a fallbackpull/1297/head
parent
3b47bc3684
commit
4cee5bd38a
|
|
@ -624,7 +624,13 @@ __git_commands () {
|
||||||
then
|
then
|
||||||
printf "%s" "${GIT_TESTING_COMMAND_COMPLETION}"
|
printf "%s" "${GIT_TESTING_COMMAND_COMPLETION}"
|
||||||
else
|
else
|
||||||
git help -a|egrep '^ [a-zA-Z0-9]'
|
git_cmd_list=$(git help -a|egrep '^ [a-zA-Z0-9]')
|
||||||
|
if [ ! -z "$git_cmd_list" ]
|
||||||
|
then
|
||||||
|
"$git_cmd_list"
|
||||||
|
else
|
||||||
|
git --list-cmds=main,others,alias,nohelpers
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue