Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Broken bash completion #138

Closed
candlerb opened this issue Nov 14, 2019 · 4 comments · May be fixed by #1683
Closed

Broken bash completion #138

candlerb opened this issue Nov 14, 2019 · 4 comments · May be fixed by #1683
Assignees

Comments

@candlerb
Copy link

  • Type "./pulsarctl topics de"
  • Hit Tab

Result:

$ ./pulsarctl topics de-su: aliashash[""]: bad array subscript
@wolfstudy
Copy link
Contributor

@bublikhpt
Copy link

I have the same problem on linux systems (centos 7, centos 8, debian testing) any of them doesn't work.

$ pulsarctl bash: aliashash[""]: bad array subscript
$ pulsarctl topbash: aliashash[""]: bad array subscript
$ pulsarctl topics bash: aliashash[""]: bad array subscript

@lyra95
Copy link

lyra95 commented Dec 31, 2024

A simple repro to this issue:

FROM ubuntu:24.04

RUN apt-get update && apt-get install -y curl bash-completion

RUN bash -c "$(curl -fsSL https://raw.githubusercontent.com/streamnative/pulsarctl/master/install.sh)"

RUN echo 'export PATH=${PATH}:${HOME}/.pulsarctl/plugins' >> ~/.bashrc \
        && echo "source /etc/profile.d/bash_completion.sh" >> ~/.bashrc \
        && echo ". <(pulsarctl completion bash)" >> ~/.bashrc
❯ docker run --rm -it pulsarctl:test bash
root@18000a6fb81c:/# echo $BASH_VERSION
5.2.21(1)-release
root@18000a6fb81c:/# pulsarctl combash: aliashash[""]: bad array subscript
root@18000a6fb81c:/#

lyra95 added a commit to lyra95/pulsarctl that referenced this issue Dec 31, 2024
this fixes "aliashash[""]: bad array subscript" issue(streamnative#138)
@lyra95
Copy link

lyra95 commented Dec 31, 2024

@wolfstudy created a fix pr(#1683), could you check it out?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants