this was already answered by Bruce in a former thread.
> Agreed. Unfortunately this is not somethat that the end-user can fix with a
> function. It'll have to be post 1.0 thing...
>
> -- Bruce Payette [MSFT] Windows PowerShell Technical Lead Microsoft Corporation This posting is provided "AS IS" with no warranties, and confers no rights.
as I was the one that recommended Robert posting this here (on IRC) ,
sorry, I forgot
as CMD.exe does the same (only you notice it much less there)
I guess this is a difficult problem .
but its good that it is named again as it would very much improve the
usability of tab expansion.
b.t.w. as a workaround you can sometimes get some text back by using the
right arrow if it was the last line.
I also made my first addition to the standard command completion, I
added tab expansion support for types, so you can do :
[dateTime]:: [tab]
[datetime]::Compare(
[consolecolor]::B [tab]
[consolecolor]::Black [tab]
you can find it here :
http://mow001.blogspot.com/2006/05/p...ompletion.html
gr /\/\o\/\/
flashdrvnk wrote:
> Hello,
>
> I was kind of surprised to see Powershell still completes filenames and
> discards everything what was typed after the current cursor position.
>
> Scenario:
>
> You type: `gvim apps\server\tcpserver.rb` and get "gvim not recognized..."
> because you just upgraded to vim 7 and didn't adjust your %PATH%
>
> You type: ArrowUp, Home, delete gvim and want to tabcompletet to your gvim.exe
> Once you pressed TAB your filename is gone.
>
>
> Attempt:
>
> Since RC1 you are able to gc the functions and redefine them, so I thought
> about making my own TabExpansion.
> I failed, since $line referrs NOT to the whole line but to the part of the
> line until the cursor position.
>
>
> Question:
>
> Is there a way to change the behaviour, so that you keep the rest of the
> line after completion?
> If not, is it on the todo list?
> I know there are other users, which demand the same feature.
>
>
> Thanks for reading.
> Robert Retzbach