![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
|
Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
br> br> |
| |||||||
![]() |
| | Thread Tools | Display Modes |
| | #1 (permalink) |
| Guest | parameter abbreviation can parameters be abbreviated? like shortening SilentlyContinue into something like sc??? -- $hay http://scriptolog.blogspot.com |
My System Specs![]() |
| | #2 (permalink) |
| Guest | Re: parameter abbreviation My understanding from when this was discussed before is that switches can be abbreviated, but not the values. i.e. copy-item -path c:\myfile.txt -dest d:\myfile.txt so... in your case... SilentlyContinue is a value... so I dont think you can. -- Brandon Shell --------------- Stop by my blog some time ![]() http://mybsinfo.blogspot.com/ ---------------------------------- "$hay" <no@addre.ss> wrote in message news:%23JURIjnOHHA.3268@TK2MSFTNGP03.phx.gbl... > can parameters be abbreviated? > > like shortening SilentlyContinue into something like sc??? > > -- > $hay > http://scriptolog.blogspot.com > > > > |
My System Specs![]() |
| | #3 (permalink) |
| Guest | Re: parameter abbreviation "$hay" <no@addre.ss> wrote in message news:%23JURIjnOHHA.3268@TK2MSFTNGP03.phx.gbl... > can parameters be abbreviated? > > like shortening SilentlyContinue into something like sc??? I've disliked SilentlyContinue from the get go. It is just too darn long to type. At one time I proposed changing that value to be Ignore so that you would have (Stop, Inquire, Continue and Ignore). Some might argue that Ignore doesn't adequately indicate that all traces of the error are, well, ignored. But I would argue that Continue doesn't really indicate that error messages will still be output. OTOH when you have Continue together with SilentlyContinue this helps clarify the behaviors of each. -- Keith |
My System Specs![]() |
| | #4 (permalink) |
| Guest | Re: parameter abbreviation if you use my tabcompletion ( http://thepowershellguy.com/blogs/po.../powertab.aspx ), you can do this : PS H:\> add-tabExpansion 'sc' 'SilentlyContinue' Filter Text Type ------ ---- ---- sc SilentlyContinue Custom now the first tab will give Set-Content and on the second tab you will get SilentlyContinue Greetings /\/\o\/\/ "Keith Hill [MVP]" wrote: > "$hay" <no@addre.ss> wrote in message > news:%23JURIjnOHHA.3268@TK2MSFTNGP03.phx.gbl... > > can parameters be abbreviated? > > > > like shortening SilentlyContinue into something like sc??? > > I've disliked SilentlyContinue from the get go. It is just too darn long to > type. At one time I proposed changing that value to be Ignore so that you > would have (Stop, Inquire, Continue and Ignore). Some might argue that > Ignore doesn't adequately indicate that all traces of the error are, well, > ignored. But I would argue that Continue doesn't really indicate that error > messages will still be output. OTOH when you have Continue together with > SilentlyContinue this helps clarify the behaviors of each. > > -- > Keith > > > |
My System Specs![]() |
| | #5 (permalink) |
| Guest | Re: parameter abbreviation very powerfull staff! Cheers -- $hay http://scriptolog.blogspot.com "/\/\o\/\/ [MVP]" <oMVP@discussions.microsoft.com> wrote in message news:568141EC-B2CC-4655-8DD6-CC1E5B768EF7@microsoft.com... > if you use my tabcompletion ( > http://thepowershellguy.com/blogs/po.../powertab.aspx ), > you can do this : > > PS H:\> add-tabExpansion 'sc' 'SilentlyContinue' > > Filter Text > Type > ------ ---- > ---- > sc SilentlyContinue > Custom > > now the first tab will give Set-Content and on the second tab you will get > SilentlyContinue > > Greetings /\/\o\/\/ > > > "Keith Hill [MVP]" wrote: > >> "$hay" <no@addre.ss> wrote in message >> news:%23JURIjnOHHA.3268@TK2MSFTNGP03.phx.gbl... >> > can parameters be abbreviated? >> > >> > like shortening SilentlyContinue into something like sc??? >> >> I've disliked SilentlyContinue from the get go. It is just too darn long >> to >> type. At one time I proposed changing that value to be Ignore so that >> you >> would have (Stop, Inquire, Continue and Ignore). Some might argue that >> Ignore doesn't adequately indicate that all traces of the error are, >> well, >> ignored. But I would argue that Continue doesn't really indicate that >> error >> messages will still be output. OTOH when you have Continue together with >> SilentlyContinue this helps clarify the behaviors of each. >> >> -- >> Keith >> >> >> |
My System Specs![]() |
| | #6 (permalink) |
| Guest | Re: parameter abbreviation Thanks, b.t.w. in this case a good alias to use for SilentlyContinue is 0 PoSH> [System.Management.Automation.ActionPreference]::SilentlyContinue SilentlyContinue PoSH> [int][System.Management.Automation.ActionPreference]::SilentlyContinue 0 PoSH> ls dfjhl Get-ChildItem : Cannot find path 'C:\PowerShell\dfjhl' because it does not exist. At line:1 char:3 + ls <<<< dfjhl PoSH> ls dfjhl -ea 0 Greetings /\/\o\/\/ "$hay" <no@addre.ss> wrote in message news:ue9s8PyOHHA.4332@TK2MSFTNGP03.phx.gbl... > very powerfull staff! > > Cheers > > -- > $hay > http://scriptolog.blogspot.com > > > > "/\/\o\/\/ [MVP]" <oMVP@discussions.microsoft.com> wrote in message > news:568141EC-B2CC-4655-8DD6-CC1E5B768EF7@microsoft.com... >> if you use my tabcompletion ( >> http://thepowershellguy.com/blogs/po.../powertab.aspx ), >> you can do this : >> >> PS H:\> add-tabExpansion 'sc' 'SilentlyContinue' >> >> Filter Text >> Type >> ------ ---- >> ---- >> sc SilentlyContinue >> Custom >> >> now the first tab will give Set-Content and on the second tab you will >> get >> SilentlyContinue >> >> Greetings /\/\o\/\/ >> >> >> "Keith Hill [MVP]" wrote: >> >>> "$hay" <no@addre.ss> wrote in message >>> news:%23JURIjnOHHA.3268@TK2MSFTNGP03.phx.gbl... >>> > can parameters be abbreviated? >>> > >>> > like shortening SilentlyContinue into something like sc??? >>> >>> I've disliked SilentlyContinue from the get go. It is just too darn >>> long to >>> type. At one time I proposed changing that value to be Ignore so that >>> you >>> would have (Stop, Inquire, Continue and Ignore). Some might argue that >>> Ignore doesn't adequately indicate that all traces of the error are, >>> well, >>> ignored. But I would argue that Continue doesn't really indicate that >>> error >>> messages will still be output. OTOH when you have Continue together >>> with >>> SilentlyContinue this helps clarify the behaviors of each. >>> >>> -- >>> Keith >>> >>> >>> > > |
My System Specs![]() |
| | #7 (permalink) |
| Guest | Re: parameter abbreviation certainly the shortest that can be :-) -- $hay http://scriptolog.blogspot.com "/\/\o\/\/ [MVP]" <mow001@hotmail.NoSpam> wrote in message news:413CC5B5-B2B2-4856-A634-573C99D60D8F@microsoft.com... > Thanks, > b.t.w. in this case a good alias to use for SilentlyContinue is 0 > > > PoSH> [System.Management.Automation.ActionPreference]::SilentlyContinue > SilentlyContinue > PoSH> > [int][System.Management.Automation.ActionPreference]::SilentlyContinue > 0 > PoSH> ls dfjhl > Get-ChildItem : Cannot find path 'C:\PowerShell\dfjhl' because it does not > exist. > At line:1 char:3 > + ls <<<< dfjhl > PoSH> ls dfjhl -ea 0 > > Greetings /\/\o\/\/ > > "$hay" <no@addre.ss> wrote in message > news:ue9s8PyOHHA.4332@TK2MSFTNGP03.phx.gbl... >> very powerfull staff! >> >> Cheers >> >> -- >> $hay >> http://scriptolog.blogspot.com >> >> >> >> "/\/\o\/\/ [MVP]" <oMVP@discussions.microsoft.com> wrote in message >> news:568141EC-B2CC-4655-8DD6-CC1E5B768EF7@microsoft.com... >>> if you use my tabcompletion ( >>> http://thepowershellguy.com/blogs/po.../powertab.aspx ), >>> you can do this : >>> >>> PS H:\> add-tabExpansion 'sc' 'SilentlyContinue' >>> >>> Filter Text >>> Type >>> ------ ---- >>> ---- >>> sc SilentlyContinue >>> Custom >>> >>> now the first tab will give Set-Content and on the second tab you will >>> get >>> SilentlyContinue >>> >>> Greetings /\/\o\/\/ >>> >>> >>> "Keith Hill [MVP]" wrote: >>> >>>> "$hay" <no@addre.ss> wrote in message >>>> news:%23JURIjnOHHA.3268@TK2MSFTNGP03.phx.gbl... >>>> > can parameters be abbreviated? >>>> > >>>> > like shortening SilentlyContinue into something like sc??? >>>> >>>> I've disliked SilentlyContinue from the get go. It is just too darn >>>> long to >>>> type. At one time I proposed changing that value to be Ignore so that >>>> you >>>> would have (Stop, Inquire, Continue and Ignore). Some might argue that >>>> Ignore doesn't adequately indicate that all traces of the error are, >>>> well, >>>> ignored. But I would argue that Continue doesn't really indicate that >>>> error >>>> messages will still be output. OTOH when you have Continue together >>>> with >>>> SilentlyContinue this helps clarify the behaviors of each. >>>> >>>> -- >>>> Keith >>>> >>>> >>>> >> >> > |
My System Specs![]() |
| | #8 (permalink) |
| Guest | Re: parameter abbreviation I made another part in the series about the Tabcompletion, about making you own Custom "Tab - Only" alliases, and adding them to the tabcompletion. http://thepowershellguy.com/blogs/po...utilities.aspx bugs, tips, feature requests and questions welcome !! Greetings /\/\o\/\/ "$hay" <no@addre.ss> wrote in message news:eibt020OHHA.3872@TK2MSFTNGP06.phx.gbl... > certainly the shortest that can be :-) > > -- > $hay > http://scriptolog.blogspot.com > > > > "/\/\o\/\/ [MVP]" <mow001@hotmail.NoSpam> wrote in message > news:413CC5B5-B2B2-4856-A634-573C99D60D8F@microsoft.com... >> Thanks, >> b.t.w. in this case a good alias to use for SilentlyContinue is 0 >> >> >> PoSH> [System.Management.Automation.ActionPreference]::SilentlyContinue >> SilentlyContinue >> PoSH> >> [int][System.Management.Automation.ActionPreference]::SilentlyContinue >> 0 >> PoSH> ls dfjhl >> Get-ChildItem : Cannot find path 'C:\PowerShell\dfjhl' because it does >> not exist. >> At line:1 char:3 >> + ls <<<< dfjhl >> PoSH> ls dfjhl -ea 0 >> >> Greetings /\/\o\/\/ >> >> "$hay" <no@addre.ss> wrote in message >> news:ue9s8PyOHHA.4332@TK2MSFTNGP03.phx.gbl... >>> very powerfull staff! >>> >>> Cheers >>> >>> -- >>> $hay >>> http://scriptolog.blogspot.com >>> >>> >>> >>> "/\/\o\/\/ [MVP]" <oMVP@discussions.microsoft.com> wrote in message >>> news:568141EC-B2CC-4655-8DD6-CC1E5B768EF7@microsoft.com... >>>> if you use my tabcompletion ( >>>> http://thepowershellguy.com/blogs/po.../powertab.aspx ), >>>> you can do this : >>>> >>>> PS H:\> add-tabExpansion 'sc' 'SilentlyContinue' >>>> >>>> Filter Text >>>> Type >>>> ------ ---- >>>> ---- >>>> sc SilentlyContinue >>>> Custom >>>> >>>> now the first tab will give Set-Content and on the second tab you will >>>> get >>>> SilentlyContinue >>>> >>>> Greetings /\/\o\/\/ >>>> >>>> >>>> "Keith Hill [MVP]" wrote: >>>> >>>>> "$hay" <no@addre.ss> wrote in message >>>>> news:%23JURIjnOHHA.3268@TK2MSFTNGP03.phx.gbl... >>>>> > can parameters be abbreviated? >>>>> > >>>>> > like shortening SilentlyContinue into something like sc??? >>>>> >>>>> I've disliked SilentlyContinue from the get go. It is just too darn >>>>> long to >>>>> type. At one time I proposed changing that value to be Ignore so that >>>>> you >>>>> would have (Stop, Inquire, Continue and Ignore). Some might argue >>>>> that >>>>> Ignore doesn't adequately indicate that all traces of the error are, >>>>> well, >>>>> ignored. But I would argue that Continue doesn't really indicate that >>>>> error >>>>> messages will still be output. OTOH when you have Continue together >>>>> with >>>>> SilentlyContinue this helps clarify the behaviors of each. >>>>> >>>>> -- >>>>> Keith >>>>> >>>>> >>>>> >>> >>> >> > > |
My System Specs![]() |
| | #9 (permalink) |
| Guest | Re: parameter abbreviation $hay wrote: > can parameters be abbreviated? > > like shortening SilentlyContinue into something like sc??? Can't you do something like Si* instead of SilentlyContinue? I thought you could. |
My System Specs![]() |
| | #10 (permalink) |
| Guest | Re: parameter abbreviation As /\/\o\/\/ replied, replacing SilentlyContinue with 0 is the same. Still, if theres a way to shorten any other paramaters... -- $hay http://scriptolog.blogspot.com "Adam Milazzo" <adamm@san.rr.com> wrote in message news:OK5Ip3UPHHA.1552@TK2MSFTNGP05.phx.gbl... > $hay wrote: >> can parameters be abbreviated? >> >> like shortening SilentlyContinue into something like sc??? > > Can't you do something like Si* instead of SilentlyContinue? I thought > you could. |
My System Specs![]() |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Using multiple Parameter sets for a Parameter | AgentM | PowerShell | 2 | 07-29-2008 01:41 AM |
| Speech Recognition and Abbreviation | Rob N | Vista General | 0 | 05-02-2008 05:11 PM |
| parameter set fun | Darren Mar-Elia | PowerShell | 18 | 01-28-2008 08:46 PM |
| What is Parameter HelpMessage for? | John Vottero | PowerShell | 1 | 07-19-2007 07:02 PM |
| How to best control parameter attributes and parameter parsing in your own scripts? | Audun Gjerken | PowerShell | 1 | 03-04-2007 04:07 PM |