zsh-users
 help / color / mirror / code / Atom feed
From: Eric Cook <llua@gmx.com>
To: zsh-users@zsh.org
Subject: Re: Sourcing bash completion files
Date: Thu, 31 Dec 2015 03:17:54 -0500	[thread overview]
Message-ID: <5684E4B2.8000100@gmx.com> (raw)
In-Reply-To: <151230173658.ZM9725@torch.brasslantern.com>

On 12/30/2015 08:36 PM, Bart Schaefer wrote:
> On Dec 31, 12:22am, Alarig Le Lay wrote:
> }
> } source /usr/share/bash-completion/bash_completion
> } 
> } But I have an error on the source line:
> } /usr/share/bash-completion/bash_completion:35: parse error near `]]'
> 
> Interesting, it appears bash has adopted the ksh-style @(...) grouping
> syntax.  (Chet will probably confirm or deny.)
> 
> Try:
> 
> emulate sh -o kshglob -c 'source /usr/share/bash-completion/bash_completion'
> 
that error is due to [[ not being able to span across lines.
ignoring that, unfortunately that file has a quite a few bashism that just won't work in zsh.
an incomplete list:
 - printf having a -v option (saves the output to a parameter).
 - relying on parameters like BASH_SOURCE, FUNCNAME
 - use of the bash builtins shopt, compopt and bind
 - bash's typeset -F option prints function names where as zsh's typeset -F sets the floating point attribute


  reply	other threads:[~2015-12-31  8:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-30 23:22 Alarig Le Lay
2015-12-31  1:36 ` Bart Schaefer
2015-12-31  8:17   ` Eric Cook [this message]
2015-12-31 10:30     ` Alarig Le Lay
2015-12-31 11:19 ` Oliver Kiddle
2015-12-31 11:51   ` Alarig Le Lay

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5684E4B2.8000100@gmx.com \
    --to=llua@gmx.com \
    --cc=zsh-users@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).