[Bash-completion-devel] Bug#888090: bash-completion: Allow to run python zipapp (pyz files)

Salvo Tomaselli tiposchi at tiscali.it
Tue Jan 23 08:36:38 UTC 2018


Package: bash-completion
Version: 1:2.1-4.3
Severity: normal
Tags: patch

Dear Maintainer,

Currently the completion does not support python zipapp files. This means that
tab doesn't complete them at all and I need to ls and then copy-paste the name
of the file.

Here's a patch to fix this.

Best

-- System Information:
Debian Release: 9.3
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.9.0-5-amd64 (SMP w/4 CPU cores)
Locale: LANG=it_IT.UTF-8, LC_CTYPE=it_IT.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to it_IT.UTF-8), LANGUAGE=it (charmap=UTF-8) (ignored: LC_ALL set to it_IT.UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages bash-completion depends on:
ii  bash  4.4-5
ii  dpkg  1.18.24

bash-completion recommends no packages.

bash-completion suggests no packages.

-- no debconf information
-------------- next part --------------
commit d7723dfd52eb0173fd575a287c1ed2b22bd5f2e3
Author: Salvo Tomaselli <tiposchi at tiscali.it>
Date:   Tue Jan 23 09:30:00 2018 +0100

    Complete *pyz files
    
    See this: https://docs.python.org/3/library/zipapp.html
    
    They are zip files which contain an entire python program.

diff --git a/completions/python b/completions/python
index 9c7cec1..56e43d0 100644
--- a/completions/python
+++ b/completions/python
@@ -45,7 +45,7 @@ _python()
 
 
     if [[ "$cur" != -* ]]; then
-        _filedir 'py?([co])'
+        _filedir 'py?([coz])'
     else
         COMPREPLY=( $( compgen -W '$( _parse_help "$1" -h )' -- "$cur" ) )
     fi


More information about the Bash-completion-devel mailing list