FS#65349 - [python-pip] Install fish and zsh completions
            Attached to Project:
            Arch Linux
            
Opened by Phil Schaf (flying-sheep) - Saturday, 01 February 2020, 17:48 GMT
Last edited by Buggy McBugFace (bugbot) - Saturday, 25 November 2023, 20:24 GMT
          Opened by Phil Schaf (flying-sheep) - Saturday, 01 February 2020, 17:48 GMT
Last edited by Buggy McBugFace (bugbot) - Saturday, 25 November 2023, 20:24 GMT
| 
 | Details
                    You install `pip completion --bash`, but not `--fish` or
                    `--zsh`.
                   | 
              This task depends upon
              
              
            
            
          
            Closed by  Buggy McBugFace (bugbot)
Saturday, 25 November 2023, 20:24 GMT
Reason for closing: Moved
Additional comments about closing: https://gitlab.archlinux.org/archlinux/p ackaging/packages/python-pip/issues/2
          
        Saturday, 25 November 2023, 20:24 GMT
Reason for closing: Moved
Additional comments about closing: https://gitlab.archlinux.org/archlinux/p ackaging/packages/python-pip/issues/2
 
                      
As the zsh completion integration does not work, would you mind opening an upstream ticket for that and linking it here?
Are those what you mean? Otherwise I think it makes more sense for you to open a ticket in which you specify what you mean exactly
Upstream pip completions may be fixed after [2] is resolved. The script from upstream pip should be more complete than /usr/share/zsh/site-functions/_pip as it calls the pip command to generate completions, but it is also slower.
[1] https://github.com/zsh-users/zsh/commit/b7490d337676b212be881bf692cb0db78ed42bc2
[2] https://github.com/pypa/pip/issues/12166
PYTHONPATH="$pkgdir/$_site_packages" "$pkgdir"/usr/bin/pip completion --zsh | install -vDm 644 /dev/stdin "$pkgdir"/usr/share/zsh/site-functions/_pip
should be changed to
PYTHONPATH="$pkgdir/$_site_packages" "$pkgdir"/usr/bin/pip completion --zsh | tail -n+3 | install -vDm 644 /dev/stdin "$pkgdir"/usr/share/zsh/site-functions/_pip
[1] https://github.com/pypa/pip/issues/12166#issuecomment-1646508058