powershell - Creating Alias to `man` with arguments -online? -
i want create alias get-help [foo] -online
. can't arguments work.
i tried few things including set-alias -name mano -value "get-help -online"
ps c:\program files\conemu> mano get-content cannot resolve alias 'mano' because refers term 'get-help -online', not recognized cmdlet, function, operable program, or script file. verify term , try again. @ line:1 char:5 + mano <<<< get-content + categoryinfo : objectnotfound: (mano:string) [], commandno tfoundexception + fullyqualifiederrorid : aliasnotresolvedexception
you can't create alias arguments that.
you can use function though. like...
ps> function mano { get-help $args[0] -online }
if want available every time start ps, can put in profile. see $profile
.
Comments
Post a Comment