.NET Framework - Relative Path Completion
Asked By Ben Kittrel
02-May-07 05:00 PM
I know this sounds trivial, but the way PowerShell expands to a full path
when using tab completion really annoys me. Is there a way to configure it
to us relative path completion, like cmd?
For example if I'm in c:\data and type 'cd pro<TAB>', I want it to say 'cd
projects', rather than 'cd C:\data\projects'.
PowerShell
(1)
MSFT
(1)
BTW
(1)
AED
(1)
DE
(1)
Completion
(1)
Bruce
(1)
Microsoft
(1)
Bruce Payette [MSFT] replied...
Based on user feedback, we're calling the current behaviour a bug and are
(hopefully) going to fix it in the next release. (As always, disclaimers
involving scheduling apply :-)
-bruce
--
Bruce Payette [MSFT]
Windows PowerShell Technical Lead
Microsoft Corporation
This posting is provided "AS IS" with no warranties, and confers no rights.
BenKittrel replied...
Very cool, thank you.
BTW, I am very much enjoying your book. Keep on keepin on.
BenKittrel replied...
Mark,
I thought the same thing, but it would be a trade off. This would interfere
with the current functionality where you can tab through the other filenames.
It's hard to say which is better. I prefer the more bash-esque method,
because it's what I'm used to.
-Ben
BenKittrel replied...
Mark,
I'm sorry, I thought you meant that if you hit tab to complete, and then hit
tab again it would add the slash and move one level deeper.
If it added the slash, but if you continued to tab it would cycle through
the elements in the directory like it does now, that would be incredible.
-Ben
Match command confusion .NET Framework From Bruce's book: If I try this (BTW, in my hands, it's important to not have spaces between the parentheses) returns "true match and the b match. What is the right way to think about this? Thanks Powershell Discussions PS (1) PowerShell (1) KeithWhat (1) ThanksRe (1) DFFA (1) MSFT (1) NET (1) EAD (1) The use of capturing parenthesis does not change the fact Name Value - -- - - -- -- 3 d 2 b 1 a 0 abd The .NET regular expressions that PowerShell uses are exhaustively documented at: http: / / msdn2.microsoft.com / en-us / library / az24scfc.aspx -bruce - - Bruce Payette [MSFT] Windows PowerShell Technical Lead Microsoft Corporation This posting is provided "AS IS" with no warranties, and confers no rights. keywords: Match, command, confusion description: From Bruce's book: If I try this (BTW, in my hands, it's important to not have spaces between the parentheses) abc -match
Backreference Constructs .NET Framework After searching through Windows Powershell In Action, Powershell: TFM, Powershell Quick Reference, the newsgroup, and the web in general I'm at a loss to find any information about Powershell's support for regex backreference constructs. Am I just missing something? I make a good of backreferences in my regex work - - I'd hate it not to be available in powershell. So, what's the shortest way to do a search / replace on, say, a csv replacement patter is: " | \ 1 | \ 2 | " Yields: What's an efficient means of achieving this in powershell? Match has named captures, but I need to replace. Anything based off of match is to get messy, I'd think. Thanks - - Christopher D. Walborn Technical Support Agnoli, Barber & Brundage Powershell Discussions BrundageReferences (1) MSFTNGP (1) MSFT (1) PS (1) TK (1) KeithRe (1) BrundagePS (1) BrundageRe (1) Woops. That should read
Powershell Analyzer Beta 4 - with vista support. .NET Framework get it from our site. http: / / www com and read about it on my blog http: / / www.karlprosser.com / coder / ?p = 68 - -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- - Powershell Analyzer Beta 4 Released! DOWNLOAD NOW Beta 4 (build 1.0.1.11) is likely 64 bit systems. Major features since Beta 3. Vista compatible. Property Grid Enhancements Often in powershell I found myself wanting to know (how many items the last command returned. So I run me that way. Agility in Input. You already are aware that previous builds of powershell analyzer have a variety of ways to give input to powershell, from the commandline area which works more like the traditional command line where you type visual organization of your code, so its easier to manage editing a larger document, in powershell analyzer, a region allow you a way of interacting with powershell, of running a command. You just highlight the region and press f5 to run it yay" Better handling of profiles / help i.e see this screenshot here, where I have Powershell Extentions loaded in my profile, and its help shows up, as shown in the help
of -width option in format-table point to deeper probl .NET Framework I'm a PowerShell newb, so I might have this all wrong. But I get the nagging feeling that this an apparently minor oversight actually betrays a deeper issue within PowerShell. I'm hoping some smart person will prove me wrong. I simply want to write my column widths, as this wraps or truncates unacceptably. Thanks for any ideas you have. Powershell Discussions Excel (1) CMDLets (1) VBScript (1) Report (1) ComputerSystem (1) DisplayName (1) FileTable (1 would produce a horrible side effect of polluting the output stream which in essence makes powershell just cmd.exe. Powershell's power comes from the concept of dealing with objects and not text. If you with trash objects and it would be easier just to deal with the text. In Powershell we have three different data streams Host Output Error These are in place to provide http: / / www.bsonposh.com / PSH Scripts Project: www.codeplex.com / psobject v> I'm a PowerShell newb, so I might have this all wrong. But I get the v> nagging feeling that this an apparently minor oversight actually v> betrays a deeper issue within PowerShell. I'm hoping some smart v> person will prove me wrong. v> v> I simply