fast-syntax-highlighting icon indicating copy to clipboard operation
fast-syntax-highlighting copied to clipboard

[feat]: alias-proof syntax highlighting

Open GotaLoveFiraCode opened this issue 2 years ago • 2 comments

If the feature request is for a plugin or theme, specify it here.

fast syntax highlighting

If the feature solves a problem you have, specify it here.

I use an alias for sudo: _. When I use this alias, the alias itself has highlighting, but everything after it doesn’t. Highlighting works fine for sudo. Example:

$ _ dnf update

_ is highlighted, dnf update is not.

$ sudo dnf update

sudo and dnf are highlighted green, update yellow (intended behavior).

Describe the proposed feature.

It would be awesome if fast-syntax-highlighting could interpret aliases, and one could achieve proper syntax highlighting despite using them.

Describe alternatives you've considered

No response

Additional context

fast-syntax-highlighting does manage to interpret aliases to a certain degree, the problem really does seem to be “nested” commands :) Love the plugin though!!! Keep up the good work!

2024-01-03T20:14:03,826227021+01:00 2024-01-03T20:14:09,925853723+01:00

Related Issues

No response

GotaLoveFiraCode avatar Jan 03 '24 19:01 GotaLoveFiraCode

I also ran into this issue.

alias foo="noglob foo"
foo bar?

bar? will highlight blue.

L0laapk3 avatar Jun 13 '24 13:06 L0laapk3

hum, don't have this problem with zsh-syntax-highlighting

AtifChy avatar Aug 08 '24 07:08 AtifChy