When I try to set an alias where I will type w++17 it should correspond to w++17 -g++ main.cpp -Wall -Wextra -pedantic -Weffc++ -Wold-style-cast -Woverloaded-virtual -fmax-errors=3
I do it in Poweshell terminal using VSCODE. When I try to set the alias I do:
Set-Alias -Name w++17 -Value g++ main.cpp -Wall -Wextra -pedantic -Weffc++ -Wold-style-cast -Woverloaded-virtual -fmax-errors=3
I get the following error:
Set-Alias : A positional parameter cannot be found that accepts argument 'main.cpp'.
At line:1 char:1
+ Set-Alias -Name w++17 -Value g++ main.cpp -Wall -Wextra -pedantic -We ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [Set-Alias], ParameterBindingException
+ FullyQualifiedErrorId : PositionalParameterNotFound,Microsoft.PowerShell.Commands.SetAliasCommand
It looks like I cant set an alias containing multiple values/arguments?