![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | Known bug? arbitrary switch options work. Is this a known bug? You can specify arbitrary switch options whose initial parts match specific options. PS> switch -c ('abc') {'abc' {"one"} 'ABC' {"two"}} one PS> switch -cf ('abc') {'abc' {"one"} 'ABC' {"two"}} one |
My System Specs![]() |
| | #2 (permalink) |
| | Re: Known bug? arbitrary switch options work. Yes. This looks like bug. In current implementation, we just match the first character. Please post a bug on this. -- George Xie [MSFT] Microsoft Command Shell Development Microsoft Corporation This posting is provided "AS IS" with no warranties, and confers no rights. "Alex K. Angelopoulos [MVP]" <aka@online.mvps.org> wrote in message news:uzVJjC49GHA.1200@TK2MSFTNGP02.phx.gbl... > Is this a known bug? You can specify arbitrary switch options whose > initial parts match specific options. > > > PS> switch -c ('abc') {'abc' {"one"} 'ABC' {"two"}} > one > PS> switch -cf ('abc') {'abc' {"one"} 'ABC' {"two"}} > one > |
My System Specs![]() |
| | #3 (permalink) |
| | Re: Known bug? arbitrary switch options work. Done: https://connect.microsoft.com/feedba...1373&SiteID=99 "George Xie [MSFT]" <gxie@online.microsoft.com> wrote in message news:O$peCP59GHA.4404@TK2MSFTNGP04.phx.gbl... > Yes. This looks like bug. In current implementation, we just match the > first character. Please post a bug on this. > > -- > George Xie [MSFT] > Microsoft Command Shell Development > Microsoft Corporation > This posting is provided "AS IS" with no warranties, and confers no > rights. > > "Alex K. Angelopoulos [MVP]" <aka@online.mvps.org> wrote in message > news:uzVJjC49GHA.1200@TK2MSFTNGP02.phx.gbl... >> Is this a known bug? You can specify arbitrary switch options whose >> initial parts match specific options. >> >> >> PS> switch -c ('abc') {'abc' {"one"} 'ABC' {"two"}} >> one >> PS> switch -cf ('abc') {'abc' {"one"} 'ABC' {"two"}} >> one >> > > |
My System Specs![]() |
| | #4 (permalink) |
| | Re: Known bug? arbitrary switch options work. "Alex K. Angelopoulos [MVP]" <aka@online.mvps.org> wrote in message news:uzVJjC49GHA.1200@TK2MSFTNGP02.phx.gbl... > PS> switch -cf ('abc') {'abc' {"one"} 'ABC' {"two"}} > one Whoa, what's with the -cf? What option does that map to? Surely not -casesensitive. And surely not -casesensitive -file. What gives?? -- Keith |
My System Specs![]() |
| | #5 (permalink) |
| | Re: Known bug? arbitrary switch options work. Yep; only the first character of the option is examined. So even -caseINsensitive is interpreted as -casesensitive. ![]() "Keith Hill [MVP]" <r_keith_hill@mailhot.moc.nospam> wrote in message news:uxNFDpK%23GHA.4524@TK2MSFTNGP04.phx.gbl... > "Alex K. Angelopoulos [MVP]" <aka@online.mvps.org> wrote in message > news:uzVJjC49GHA.1200@TK2MSFTNGP02.phx.gbl... >> PS> switch -cf ('abc') {'abc' {"one"} 'ABC' {"two"}} >> one > > Whoa, what's with the -cf? What option does that map to? Surely > not -casesensitive. And surely not -casesensitive -file. What gives?? > > -- > Keith > |
My System Specs![]() |
| | #6 (permalink) |
| | Re: Known bug? arbitrary switch options work. This is a known bug. It's actually been around for a while. It just wasn't considered serious enought to fix for V1. -bruce -- Bruce Payette [MSFT] Windows PowerShell Technical Lead Microsoft Corporation This posting is provided "AS IS" with no warranties, and confers no rights. Visit the Windows PowerShell Team blog at: http://blogs.msdn.com/PowerShell Visit the Windows PowerShell ScriptCenter at: http://www.microsoft.com/technet/scr.../hubs/msh.mspx My Book: http://manning.com/powershell "George Xie [MSFT]" <gxie@online.microsoft.com> wrote in message news:O$peCP59GHA.4404@TK2MSFTNGP04.phx.gbl... > Yes. This looks like bug. In current implementation, we just match the > first character. Please post a bug on this. > > -- > George Xie [MSFT] > Microsoft Command Shell Development > Microsoft Corporation > This posting is provided "AS IS" with no warranties, and confers no > rights. > > "Alex K. Angelopoulos [MVP]" <aka@online.mvps.org> wrote in message > news:uzVJjC49GHA.1200@TK2MSFTNGP02.phx.gbl... >> Is this a known bug? You can specify arbitrary switch options whose >> initial parts match specific options. >> >> >> PS> switch -c ('abc') {'abc' {"one"} 'ABC' {"two"}} >> one >> PS> switch -cf ('abc') {'abc' {"one"} 'ABC' {"two"}} >> one >> > > |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Switch to 64 bit - will it work? | Virtual PC | |||
| User switch doesn’t work on Windows Vista | Virtual PC | |||
| KVM Switch does not work in the Vista? | Vista General | |||
| Arbitrary changes | Vista General | |||
| Anyway to switch from Work network setting to Home? | Vista General | |||