Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
bashcompinit: sourcing /etc/bash_completion
- X-seq: zsh-users 20254
- From: Daniel Hahler <genml+zsh-workers@xxxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: bashcompinit: sourcing /etc/bash_completion
- Date: Wed, 10 Jun 2015 22:09:18 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/simple; d=thequod.de; h= content-transfer-encoding:content-type:content-type:subject :subject:mime-version:user-agent:from:from:date:date:message-id :received:received; s=postfix2; t=1433966959; bh=WvwZ1UXKuoREf6b 9YTUIaArTMMhgEB/Pt95XkWLF4AQ=; b=fuf4Q3zEghwZk4Z5mXXx7TVieF7grAq C3euGOVNfyVrTQ9aE0NMQjqyLtSyiCTtHbNrRDLJ/I3x5SHwDoyHwgH+zOxPk88T gkPmfYBAJK4dddoBj+9fWK4EJN29BkXItXTkcA1Ub7JSIz5myiNtYgLtvwm6UrQN y/k+3QIubcM8=
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I've looked into loading /etc/bash_completion from the bash-completion
project, but it fails.
I am using the following function:
# Load bash completion system
# via http://zshwiki.org/home/convert/bash
autoload -U bashcompinit
bash_source() {
alias shopt=':'
alias _expand=_bash_expand
alias _complete=_bash_comp
emulate -L sh
setopt kshglob noshglob braceexpand
# setopt bashrematch dotglob hashall physical
have() {
unset have
(( ${+commands[$1]} )) && have=yes
}
source "$@"
}
It fails with the following line:
local cword words=()
(/usr/share/bash-completion/bash_completion:305: parse error near `()')
Would it be possible to have a `emulate -L bash` to help with this?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iD8DBQFVeJlufAK/hT/mPgARAkL8AJ9wYN4ipiH1snLuPNVMW5yfCtxdqACgpMlZ
gckUAcsu74G9Y+Bk2MwobNw=
=xgZ6
-----END PGP SIGNATURE-----
Messages sorted by:
Reverse Date,
Date,
Thread,
Author