You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add a different color for highlighting if the first word of a command is correct or incorrect (running the command won't result in "The term 'abcedf' is not recognized...").
For example, assuming an environment where v is not a valid program but vi is, typing a command such as v file.txt will highlight the v in a different color to show that v is not a valid command. When typing vi file.txt, vi will have a different color to show that it is a valid command.
Here is an example from fish shell:
The text was updated successfully, but these errors were encountered:
What if the first word is a variable? Should we check if it exists? And what if it's a file instead? I believe typing just a filename will open it in default program, same as if given as an argument to Start-Process (can't test it over SSH).
Also, should this coloring apply only to start of the line, or any command? It could be complicated if validity of it changes mid-line, e.g. $env:PATH += $path_to_v; v or Set-Alias 'v' 'vim'; v.
Fish has a different coloring for variables, which is activated as soon as you type '$'. It seems to not change colors with files unless prefaced with './' and the file is executable. And it's only at the first word.
After using it for a long time, I've found it very useful for catching mistakes before executing. I'd love to see this in PowerShell as well.
Description of the new feature/enhancement
Add a different color for highlighting if the first word of a command is correct or incorrect (running the command won't result in "The term 'abcedf' is not recognized...").
For example, assuming an environment where
v
is not a valid program butvi
is, typing a command such asv file.txt
will highlight thev
in a different color to show thatv
is not a valid command. When typingvi file.txt
,vi
will have a different color to show that it is a valid command.Here is an example from fish shell:
The text was updated successfully, but these errors were encountered: