[MSH] remove-item
Windows Server Forum Index Windows Server
Server discussion on Windows platform.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web winserverhelp.com
[MSH] remove-item

 
Post new topic   Reply to topic    Windows Server Forum Index -> Programming
Author Message
Keith Hill
Guest





Posted: Wed Nov 09, 2005 9:51 pm    Post subject: [MSH] remove-item Reply with quote

I have been using MSH as my primary shell for a few days now and one thing that is driving me a bit batty is that I can't do this:

Quote:
ri foo.cs bar.cs baz.cs

It tells me that a parameter cannot be found that matches parameter 'bar.cs'. Isn't there a way to build a cmdlet to behave like good old del or rm?

BTW, as long you are creating a bunch of item related aliases:

CommandType Name Definition
----------- ---- ----------
Alias ri remove-item
Alias si set-item
Alias ni new-item
Alias gi get-item
Alias ii invoke-item
Alias mi move-item

How about adding one for copy-item?

Alias ci copy-item

--
Keith
Back to top
Jouko Kynsijärvi
Guest





Posted: Wed Nov 09, 2005 9:51 pm    Post subject: Re: [MSH] remove-item Reply with quote

Keith Hill wrote:
Quote:
I have been using MSH as my primary shell for a few days now and one
thing that is driving me a bit batty is that I can't do this:

ri foo.cs bar.cs baz.cs

It tells me that a parameter cannot be found that matches parameter
'bar.cs'. Isn't there a way to build a cmdlet to behave like good
old del or rm?

ri foo.cs,bar.cs,baz.cs

Quote:
BTW, as long you are creating a bunch of item related aliases:

CommandType Name Definition
----------- ---- ----------
Alias ri remove-item
Alias si set-item
Alias ni new-item
Alias gi get-item
Alias ii invoke-item
Alias mi move-item

How about adding one for copy-item?

Alias ci copy-item

MSH> get-alias | where { $_.definition -like '*-item' }
....
Alias cpi copy-item
....
Back to top
Keith Hill
Guest





Posted: Thu Nov 10, 2005 1:51 am    Post subject: Re: [MSH] remove-item Reply with quote

"Jouko Kynsijärvi" <jouko.kynsijarvi@nospam.nospam> wrote in message
news:e0E2LEX5FHA.3876@TK2MSFTNGP09.phx.gbl...
Quote:
Keith Hill wrote:
I have been using MSH as my primary shell for a few days now and one
thing that is driving me a bit batty is that I can't do this:

ri foo.cs bar.cs baz.cs

It tells me that a parameter cannot be found that matches parameter
'bar.cs'. Isn't there a way to build a cmdlet to behave like good
old del or rm?

ri foo.cs,bar.cs,baz.cs

Cool, that'll work. Just put some spaces after the comma though so that
autocompletion still works. :-)

Quote:
Alias cpi copy-item

It seems like the obvious choice for copy-item whould be "ci" but I see
there is both a clear-item (cli) and a copy-item (cpi). I would have still
gone with ci for copy-item. Oh well, that is easy enough to add to my
profile.

Thanks
Keith
Back to top
 
Post new topic   Reply to topic    Windows Server Forum Index -> Programming All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




New Topics Powered by phpBB