FS#71215 - [git] Git alias completion bug
Attached to Project:
Arch Linux
Opened by Vuk Mirovic (wooque) - Thursday, 10 June 2021, 22:27 GMT
Last edited by Eli Schwartz (eschwartz) - Thursday, 10 June 2021, 22:56 GMT
Opened by Vuk Mirovic (wooque) - Thursday, 10 June 2021, 22:27 GMT
Last edited by Eli Schwartz (eschwartz) - Thursday, 10 June 2021, 22:56 GMT
|
Details
Description:
Git alias is set in .bashrc with: source "/usr/share/git/completion/git-completion.bash" alias gco="git checkout" __git_complete gco _git_checkout Everything worked fine until 2.32 upgrade, after upgrade completion works but prints on every key press: bash: [: -lt: unary operator expected bash: [: : integer expression expected bash: [: -lt: unary operator expected bash: [: -lt: unary operator expected Additional info: * package version(s) 2.32.0-1 * config and/or log files etc. * link to upstream bug report, if any Steps to reproduce: |
This task depends upon
However, it does seem like your problem is https://git.kernel.org/pub/scm/git/git.git/commit?id=59d85a2a0528c3db2552b0786caac7bf0610c552 so you may wish to talk to upstream about it.
Note that I'm not entirely sure they support you directly reusing their internal completion functions; you might be expected to wrap it as __git_complete gco _gco and define "_gco" to set up the env and then invoke _git_checkout.
Then again, they might want to support it. You'd have to ask the git developers to find out.