Skip to content

zsh-syntax-highlighting does not like the alias '=' #263

@Ndolam

Description

@Ndolam

I have a function called '=' and an alias for = which is 'noglob ='.
(I find it very useful to be able to type things like
= 417 99 2 k /
and have it tell me
4.21
)
and '=' not only seems like a nice alias for this, but is what I used for many years with tcsh before I started using zsh.

Anyway, there is a line in main-highlighter.zsh
local aliased_command="${"$(alias -- $arg)"#*=}"
which gets upset if you have an alias like '='. However, the line
local aliased_command="$aliases[$arg]"
seems to work for = and other aliases (in my tests), and is (arguably)
a bit more succinct and clearer.

Would you consider including it in the main branch?

Thanks.

                            Jim

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions