Example

To use the alias m to launch the editor Micro, open your Powershell profile in your editor:

code $PROFILE
# Or use micro / vim / notepad / etc.


Next, add the following function and alias:

function _m {$input | micro $args}
Set-Alias -Name m -Value _m

Note the use of the special variables $input and $args.

$input | allows Micro to respond to information piped to it, such as echo "test" | m.

$args allows Micro to receieve arguments such as m --version

More info:

about Automatic Variables

Create a Permanent Powershell Alias from the Command-Line