In Debian, bash seems to have more package coverage for completion. The bash-completion package has support for a good number of such scripts. Given that zsh supports bashcompinit, would it make sense to use the bash-completion provided scripts ? If not by default, a pointer in README.Debian may help many users and provide a much more comprehensive completion experience.
Hi, Ritesh Raj Sarraf wrote: Yes, but it's not a full superset. IIRC there are tools which have a zsh completion but no bash-completion. (Although it's vice versa in most cases.) Yes, but there are also quite some tools which have better zsh than bash completion. So we would need a way to check if there's a zsh completion and only fall back to the bash completion if no zsh completion is available. Not sure if bashcompinit already provides such a feature or if it replaces all of compinit with its bashy variant. At least the documentation doesn't really say in 5.0.7: The function bashcompinit provides compatibility with bash's programmable completion system. When run it will define the functions, compgen and complete which correspond to the bash builtins with the same names. It will then be possible to use completion specifications and functions written for bash. Regards, Axel
Hi again, Ritesh Raj Sarraf wrote: A short-hack "solution" would be to add a pointer to http://zshwiki.org/home/convert/bash Regards, Axel
Hi, Axel Beckert wrote: Done now in two places: zsh's README.Debian: https://anonscm.debian.org/cgit/collab-maint/zsh.git/commit/?id=f14d3594049e553de8d61e5fc1d2fa245410a867 Zsh page in the Debian Wiki: https://wiki.debian.org/Zsh Leaving the bug report open for a proper solution. Regards, Axel
If they had a common naming scheme, it would have been possible. for example: git-buildpackage ships both the zsh and bash completion /usr/share/zsh/vendor-completions/_gbp vs /etc/bash_completion.d/git-buildpackage If they had a standard/common naming scheme, some basic shell construct could be added to override one over the other.
DBUG 787005 may be a good justification why a common ground may be needed.
Actually, it is not as simple and straight forward as I thought it'd be. There are more incompatibilities. rrs@learner ~ for x in /usr/share/bash-completion/completions/*; do source $x; done /usr/share/bash-completion/completions/apropos:3: command not found: _userland /usr/share/bash-completion/completions/aptitude:3: command not found: _have /usr/share/bash-completion/completions/arch:5: command not found: _have /usr/share/bash-completion/completions/autossh:195: command not found: shopt /usr/share/bash-completion/completions/autossh:254: command not found: shopt /usr/share/bash-completion/completions/dpkg:3: command not found: _have /usr/share/bash-completion/completions/dpkg:19: command not found: _have /usr/share/bash-completion/completions/dpkg-deb:3: command not found: _have /usr/share/bash-completion/completions/dpkg-deb:19: command not found: _have /usr/share/bash-completion/completions/dpkg-query:3: command not found: _have /usr/share/bash-completion/completions/dpkg-query:19: command not found: _have /usr/share/bash-completion/completions/dpkg-reconfigure:3: command not found: _have /usr/share/bash-completion/completions/dpkg-reconfigure:19: command not found: _have /usr/share/bash-completion/completions/export:16: parse error near `&' WARNING: this script is deprecated, please see git-completion.zsh WARNING: this script is deprecated, please see git-completion.zsh /usr/share/bash-completion/completions/gphoto2:52: parse error near `$(compgen -W "$( gph...' /usr/share/bash-completion/completions/ifdown:3: command not found: _userland /usr/share/bash-completion/completions/ifstatus:3: command not found: _userland /usr/share/bash-completion/completions/ifup:3: command not found: _userland /usr/share/bash-completion/completions/man:3: command not found: _userland /usr/share/bash-completion/completions/mount:.:4: no such file or directory: .linux /usr/share/bash-completion/completions/mount.linux:83: parse error near `&' /usr/share/bash-completion/completions/pkg-get:5: command not found: _have /usr/share/bash-completion/completions/pkgrm:5: command not found: _have /usr/share/bash-completion/completions/scp:195: command not found: shopt /usr/share/bash-completion/completions/scp:254: command not found: shopt /usr/share/bash-completion/completions/sftp:195: command not found: shopt /usr/share/bash-completion/completions/sftp:254: command not found: shopt /usr/share/bash-completion/completions/slogin:195: command not found: shopt /usr/share/bash-completion/completions/slogin:254: command not found: shopt /usr/share/bash-completion/completions/ssh:195: command not found: shopt /usr/share/bash-completion/completions/ssh:254: command not found: shopt /usr/share/bash-completion/completions/umount:.:4: no such file or directory: .linux /usr/share/bash-completion/completions/wget:26: parse error near `&' /usr/share/bash-completion/completions/whatis:3: command not found: _userland /usr/share/bash-completion/completions/zeitgeist-daemon:8: command not found: _have 11:57 ♒♒♒ ☹ => 127