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 autocomplete when installing CLI with homebrew on Linux #2838

Open
srcid opened this issue Apr 24, 2024 · 4 comments
Open

Broken autocomplete when installing CLI with homebrew on Linux #2838

srcid opened this issue Apr 24, 2024 · 4 comments

Comments

@srcid
Copy link

srcid commented Apr 24, 2024

Bug report

What is the current behavior?

The autocomplete is broken installing with homebrew on linux.

Steps to reproduce it

  1. brew tap heroku/brew && brew install heroku
  2. heroku

It will show up a grep error message saying the file $HOME/Library/Caches/heroku/autocomplete/commands, which acctually don't.

What is the expected behavior?

It shoud autocomplete with options.

workaround

In the file /home/linuxbrew/.linuxbrew/share/zsh/site-functions/_heroku edit this two follow env vars.

### Keep in sync with zsh shim
HEROKU_AC_ANALYTICS_DIR=$HOME/Library/Caches/heroku/autocomplete/completion_analytics;
HEROKU_AC_COMMANDS_PATH=$HOME/Library/Caches/heroku/autocomplete/commands;

Set it as bellow.

### Keep in sync with zsh shim
HEROKU_AC_ANALYTICS_DIR=$HOME/.cache/heroku/autocomplete/completion_analytics;
HEROKU_AC_COMMANDS_PATH=$HOME/.cache/heroku/autocomplete/commands;

I belive the path are set to MacOS folders installations. So, check for OSTYPE could fix the problem.

case "$OSTYPE" in
    linux-gnu)
        HEROKU_AC_ANALYTICS_DIR=$HOME/.cache/heroku/autocomplete/completion_analytics;
        HEROKU_AC_COMMANDS_PATH=$HOME/.cache/heroku/autocomplete/commands;
        ;;
    darwin)
        HEROKU_AC_ANALYTICS_DIR=$HOME/Library/Caches/heroku/autocomplete/completion_analytics;
        HEROKU_AC_COMMANDS_PATH=$HOME/Library/Caches/heroku/autocomplete/commands;
        ;;
esac

Heroku version:  heroku/8.11.4 linux-x64 node-v16.20.2
SO: Ubuntu 22.04
Proxy: No proxy
@srcid srcid changed the title Broken utocomplete when installing CLI with homebrew on Linux Broken autocomplete when installing CLI with homebrew on Linux Apr 24, 2024
@sbosio
Copy link
Contributor

sbosio commented May 3, 2024

Hello @srcid. Thanks for this report. Can you confirm your Linux distro and shell? I wasn't able to reproduce on Fedora / Bash, but reading through the issue I believe this might be a problem that effects only ZSH shell.

@srcid
Copy link
Author

srcid commented May 3, 2024

Hi @sbosio. Thank you for answering. I'm using Ubuntu 22.04 and ZSH as my main shell. I didn't test with bash because I don't think it could be related with the shell.

@sbosio
Copy link
Contributor

sbosio commented May 3, 2024

Thanks for the confirmation. I will create a work item for the team to address this installation bug under ZSH.

@sbosio sbosio added bug and removed question labels May 3, 2024
@sbosio
Copy link
Contributor

sbosio commented May 3, 2024

GUS Work Item for tracking purposes (Heroku internal).

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

No branches or pull requests

2 participants