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

WIP: 'main': Apply the parameter expansion logic regardless of the type #718

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

danielshahaf
Copy link
Member

See log messages for details.

Any concerns with the changed behaviour (see the updated test expectations)?

@danielshahaf danielshahaf added this to the 0.8.0 milestone Mar 28, 2020
The existing check was bogus: parameter expansion doesn't depend on
whether there happens to be a command literally called «$foo».

This enables the parameter elision logic to kick in for words not in
command position.

Fixes zsh-users#239.
@@ -1139,6 +1141,9 @@ _zsh_highlight_main_highlighter_check_assign()

_zsh_highlight_main_highlighter_highlight_path_separators()
{
if (( in_param || in_alias )); then
return
fi
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: review

@@ -1384,7 +1389,7 @@ _zsh_highlight_main_highlighter_highlight_argument()
done

if (( path_eligible )); then
if (( in_redirection )) && [[ $last_arg == *['<>']['&'] && $arg[$1,-1] == (<0->|p|-) ]]; then
if (( in_redirection && ! in_param )) && [[ $last_arg == *['<>']['&'] && $arg[$1,-1] == (<0->|p|-) ]]; then
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: review

@danielshahaf
Copy link
Member Author

Triage: Incomplete, so deferring.

@danielshahaf danielshahaf removed this from the 0.8.0 milestone May 22, 2020
@danielshahaf danielshahaf changed the title 'main': Apply the parameter expansion logic regardless of the type WIP: 'main': Apply the parameter expansion logic regardless of the type May 24, 2020
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

Successfully merging this pull request may close these issues.

1 participant