chrissicool / zsh-bash

Bash compatibility plugin for ZSH
MIT License
38 stars 5 forks source link

parse error near `\n' in bash_completion #1

Open ipchelnikov opened 4 years ago

ipchelnikov commented 4 years ago

Hi, @chrissicool

I've just installed the plugin and when I run the shell I see the following issue:

/usr/share/bash-completion/bash_completion:314: parse error near \n'

It is a pity, as it is seems to be exactly what I am looking for. I would like to be able to run Android build tools under Zsh.

Here is some additional info about my system for your reference:

uname -a
Linux EINZ6551 4.15.0-88-generic #88~16.04.1-Ubuntu SMP Wed Feb 12 04:19:15 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

bash -version
GNU bash, version 4.3.48(1)-release (x86_64-pc-linux-gnu)

zsh --version
zsh 5.1.1 (x86_64-ubuntu-linux-gnu)
ipchelnikov commented 4 years ago

For those who are looking for an alternative solution to run Android build tools in Zsh, please refer to this patch:

https://review.aosip.dev/changes/AOSIP%2Fplatform_build~4686/revisions/1/files/envsetup.sh/download

It fixes the issue for the latest Android revisions. However, when I applied to my 8.1 it also works fine... So, have fun :)

chrissicool commented 4 years ago

Hi,

I've just installed the plugin and when I run the shell I see the following issue:

/usr/share/bash-completion/bash_completion:314: parse error near \n'

Unfortunately, this plugin is not able to make Zsh 100% Bash-compatible. And I doubt there will ever be a way.

I mainly used it when I was developing AOSP (around version 4 or 5), but not so much nowadays. I have noticed already that bash_completion heavily relies on even the weirdest Bash'isms. But other than that it has worked for my basic Android building needs. It's a pitty it is not useful to you anymore. But honestly, it does not come as a surprise.

But I'm glad there is a solution in AOSP nowadays.

If you (or anyone else stumbling upon this) finds a decent solution for zsh-bash, feel free to send a PR.