Re: tab character in MSH ?
- From: Jason Gurtz <jasonNOgurtz@xxxxxxxxxxxxxxx>
- Date: Tue, 11 Apr 2006 14:31:23 -0400
Alex K. Angelopoulos [MVP] wrote:
So there may be two separate issues here:
(1) Is it possible to make MSH differentiate between a pasted and a typed
character... and _should_ it?
It surely must be possible, but would probably require some custom hooks
into some low level input driver(s) or even to the bare metal(!). We
wrote some real mode asm once that directly manipulated the keyboard
buffer under DOS, but that would require substantial/complete rewriting
to work in windows
As for the second question: Bash under Linux suffers the same problem.
I don't think that proves that MSH shouldn't have this feature ever
but I think it does say that it's not an unexpected or uncommon issue.
It would be a neat and groundbreaking feature to have that differentiation.
I dare say that pasting code from a pre-written script is just not the
right thing to be doing. I often debug snippets of shell code by having
a separate script file with test as part of the name and I just have
that open at the same time as my script and put testing stuff in there.
Then, quick save and run that script file in an open command window.
(2) Is there a compelling reason to provide an alternative character for
completion?
Sure, prior art. :) using tweakUI/registry editing, one can change the
completion char in the normal shell.
Given infinite time and infinite resources, I would suggest that a
legitimate, common indentation character should not turn into a
quick-completion character when pasted, and also that people should be able
to use anything they want as the completion character in the MSH shell.
Tab is *very* commonly used as a completion character almost everywhere,
explorer/IE address bar, bash, ksh, mozilla, opera, firefox (even
optionally in cmd.exe since at least NT4 SP?). I would probably not use
MSH as an interactive shell if the default turned into something other
than tab.
Another possibility is to have some sort of filter driver in the general
cut/copy functionality of the OS that would do on-the-fly tab->space
conversion. Or better, perhaps the console subsystem would just do
on-the-fly tab->space conversion on paste Hmm, that would screw up my
vim editing sessions. In fact, I'm wondering if a shell extension could
possibly do any of that? It looks like cmd.exe functionality already
does in a way. I executed the following line of perl:
print "start\tend";
What I got when I copied and pasted the output was
start end
^^^
|
+---Three Space Chars
The output does respect an 8 char tab stop so there's not an even ratio
of tabs to spaces.
~Jason
--
.
- References:
- tab character in MSH ?
- From: jmd.msdn
- Re: tab character in MSH ?
- From: Wei Wu [MSFT]
- Re: tab character in MSH ?
- From: Andrew Watt [MVP]
- Re: Re: tab character in MSH ?
- From: Jerold Schulman
- Re: Re: tab character in MSH ?
- From: Marcel Ortiz [MSFT]
- tab character in MSH ?
- Prev by Date: Re: [MSH] Some COM objects returned from MSH functions are "dead"
- Next by Date: Re: [MSH] Some COM objects returned from MSH functions are "dead"
- Previous by thread: Re: Re: tab character in MSH ?
- Next by thread: Re: tab character in MSH ?
- Index(es):
Relevant Pages
|