Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What runs in PowerShell when I type "alias"?

Tags:

powershell

What runs in PowerShell when I run the "alias" command?

Is it an alias? A function? It appears that "alias" is itself an alias to the get-alias command. Yet alias itself does not show up in the list returned by get-alias. Is it being stripped out?

(This is out of curiosity, I'm not planning on re-aliasing "alias" or anything crazy.)

like image 892
scobi Avatar asked Jan 24 '10 21:01

scobi


1 Answers

In powershell, if a command does not immediately match something in the command search path, it will prepend it with "get-" and try again. So when you type "alias," powershell will retry with "get-alias" if the former is not matched against a command.

-Oisin

like image 110
x0n Avatar answered Oct 04 '22 20:10

x0n