Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
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.

Go Back   Vista Forums > Misc Newsgroups > PowerShell

Vista - TabExpansion Character Index?

Reply
 
Old 10-11-2006   #1 (permalink)
Nick Howell


 
 

TabExpansion Character Index?

I'd like to do tab-expansion across an escaped space character (" "),
but I can't because of how the word is broken up. I was thinking that it
might work if I had the character index of the cursor w.r.t. the line;
with that, I can back-parse any escaped characters...

Better yet, can you make it treat an escaped character as part of the word?

Nick

My System SpecsSystem Spec
Old 10-11-2006   #2 (permalink)
Nick Howell


 
 

Re: TabExpansion Character Index?

Well, as I just discovered, a bug somewhere in my code is causing the
space problem...better look more carefully at my regexes.

It would still be nice to grab the cursor index, though...

Nick

Nick Howell wrote:
> I'd like to do tab-expansion across an escaped space character (" "),
> but I can't because of how the word is broken up. I was thinking that it
> might work if I had the character index of the cursor w.r.t. the line;
> with that, I can back-parse any escaped characters...
>
> Better yet, can you make it treat an escaped character as part of the word?
>
> Nick

My System SpecsSystem Spec
Old 10-11-2006   #3 (permalink)
dreeschkind


 
 

Re: TabExpansion Character Index?

"Nick Howell" wrote:

> It would still be nice to grab the cursor index, though...


Not sure if this is what you mean:

[console]::get_CursorLeft()

This will return the console cursor's x-position.
However, this might depend on the width of your prompt.

--
greetings
dreeschkind
My System SpecsSystem Spec
Old 10-12-2006   #4 (permalink)
Nick Howell


 
 

Re: TabExpansion Character Index?

Ah! Didn't think of that...I can probably measure prompt, so should be
OK...I'll have to experiment...

dreeschkind wrote:
> "Nick Howell" wrote:
>
>> It would still be nice to grab the cursor index, though...

>
> Not sure if this is what you mean:
>
> [console]::get_CursorLeft()
>
> This will return the console cursor's x-position.
> However, this might depend on the width of your prompt.
>
> --
> greetings
> dreeschkind

My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
TabExpansion question PowerShell
TabExpansion problem PowerShell
TabExpansion Function PowerShell
TabExpansion Timeout PowerShell
Yet another way to extend the default TabExpansion PowerShell


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46