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

Unable to highlight aliases that start with variables #938

Open
matan-h opened this issue Sep 28, 2023 · 2 comments
Open

Unable to highlight aliases that start with variables #938

matan-h opened this issue Sep 28, 2023 · 2 comments

Comments

@matan-h
Copy link

matan-h commented Sep 28, 2023

I get to this issue from bash-my-aws, which have this alias in it: alias buckets='${BMA_HOME:-$HOME/.bash-my-aws}/bin/bma buckets'.

The buckets alias works, and the autocomplete work fine, but for some reason it highlights it as not found.

There is superuser question about it.

Step to reproduce:

echo "echo run" > $HOME/run.sh
chmod +x ~/run.sh
alias run="\$HOME/run.sh"
run
@danielshahaf
Copy link
Member

danielshahaf commented Oct 2, 2023 via email

@phy1729
Copy link
Member

phy1729 commented Oct 26, 2023

In the case of $HOME/run.sh it's because _zsh_highlight_main_highlighter__try_expand_parameter expects the whole word to be a parameter expansion. Handling that wouldn't fix the original issue with ${BMA_HOME:-$HOME/.bash-my-aws} though.

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

No branches or pull requests

3 participants