nushell icon indicating copy to clipboard operation
nushell copied to clipboard

Syntax highlighting of aliases

Open TheKamboy opened this issue 1 year ago • 3 comments

Question

I discovered this question when I was setting up the theme. When highlight_resolved_externals is enabled, the alias just uses the color for if a command is not found. Is there any way to color the alias like if it was a command that did exist?

Additional context and details

No response

TheKamboy avatar May 24 '24 23:05 TheKamboy

Here's better showcase of my question, the neovim alias nv should be green and bold like the uname command. image

TheKamboy avatar May 25 '24 03:05 TheKamboy

There are two possible resolutions here:

  1. fix the highlighting so it is marked like a resolved internal command (no need for an additional config point)
  2. add a shape_alias to our color config and explicitly identify aliases during syntax highlighting.

sholderbach avatar Aug 18 '24 14:08 sholderbach

Ok

TheKamboy avatar Aug 18 '24 14:08 TheKamboy

This bug is a little more subtle than it looks initially. I'll open a PR with a proposed fix for further discussion :)

cyradotpink avatar Mar 24 '25 23:03 cyradotpink

Awesome, thanks for the help!

TheKamboy avatar Aug 21 '25 20:08 TheKamboy