Last call for v12 feature requests

samintz

Scott Mintz
May 20, 2008
1,413
13
Solon, OH, USA
Just for giggles and grins, I decided to try and see if this was remotely
possible.

I created two script files: part1.btm and part2.cmd

I enabled PathExt and removed .BAT from the PATHEXT variable.
I added an executable extension
.bat=part1.btm

Part1.btm:
cmd /c Part2.cmd %*
set /r foo

Part2.cmd:
@prompt
call %*
set > foo

Then I tested it by running a BAT script file I received from Raima that
sets up a build environment by setting a number of environment variables.
I also tested it running the vsvars32.bat script that comes with Visual
Studio.

It's crude, but it works. I don't remove any vars although an unset *
prior to the set /r should work. I don't know how to handle TITLE or CWD.


-Scott

samintz <> wrote on 05/05/2010 03:42:16 PM:


> For those rare occasions when I have to run a BAT script written by some

> third party developer, 100% CMD compatibility is desired. Since this is

> not possible due to the contrasting ways in which the parsers function,
it

> would be a really nifty feature to run the BAT script in CMD but have
any

> environment variables or directory changes propagated back to TCC.
Changes

> to TITLE would be a nice touch too.
>
> I'm not exactly sure how this could be done, but here's an idea:
>
> Since CMD will inherit the environment from TCC when launched we know
what

> the initial environment is and what the current drive/directory status
is.

> run the BAT script in CMD
> compute a differences file with what changed in the environment and
which

> directories changed.
> Apply those changes to TCC.
>
> A function called SNAPSHOT could save an initial copy and a second call
> could compute the delta.
> TCC could invoke a BAT file by enveloping it inside another BAT/CMD
file.

>
> TCC would invoke the user script by: CMD /c Compatibility100.CMD
> users.bat arg1 arg2 arg3...
>
> Compatibility100.CMD:
> TCC /c SNAPSHOT
> call %*
> TCC /c DELTA
>
> -Scott
>
>
>
>
 
May 20, 2008
10,555
78
Syracuse, NY, USA
On Wed, 05 May 2010 16:55:29 -0400, Steve Fábián <> wrote:

|Vince, your last paragraph prescribes a simple method to achieve the OP's
|goal. Save the TCC environment in a file, run CMD including saving the CMD
|environment in another file. On return sort both files, compare the files
|(using Charles Dye's @SAFEREAD function appears best as it is not affected
|by special characters) a line at a time. For each change (new variable or
|modified variable) pop up a MSGBOX and query the user whether or not to make
|the change.

Do you really need to compare the file to TCC's environment? It would seem "SET

> file" at thw end of the batch file, and "SET /r file" immediately afterward
would be sufficient. You'd get everything that was new or changed, with other
stuff left untouched.
--
- Vince
 
May 20, 2008
3,515
3
Elkridge, MD, USA
| On Wed, 05 May 2010 16:55:29 -0400, Steve Fbin <> wrote:
||
|| Vince, your last paragraph prescribes a simple method to achieve
|| the OP's goal. Save the TCC environment in a file, run CMD
|| including saving the CMD environment in another file. On return
|| sort both files, compare the files (using Charles Dye's @SAFEREAD
|| function appears best as it is not affected by special characters)
|| a line at a time. For each change (new variable or modified
|| variable) pop up a MSGBOX and query the user whether or not to make
|| the change.
|
| Do you really need to compare the file to TCC's environment? It
| would seem "SET
|
|
| ---Quote---
|| file" at thw end of the batch file, and "SET /r file" immediately
|| afterward
| ---End Quote---
| would be sufficient. You'd get everything that was new or changed,
| with other stuff left untouched.

Actually it's up to the OP whether he wants to blindly accept the
CMD-created environment, or check what's changed and do it only for
variables manually selected, or (what's most likely) accept a few
preselected changes and reject the vast majority. I just amplified your
suggestion with more details on how to accept some of the changes and reject
others interactively. Meanwhile Scott has proved that it is feasible to do.

Rex, please note how mangled things get in the email format! This is far
from the worst example. Note that I used only Outlook Express' "Reply"
button. I am not sure whether Vince used a mail client or a browser to
respond to my previous post in this thread.

BTW, until my home airconditioning is fixed, I have only sporadic use of my
computer - the CPU temperature protection shuts it down a lot.
--
Steve
 
Jun 7, 2008
121
0
Another request (and yes I know that dir is the most complex) is that

DIR and PDIR

support an enhancement to option /A - entries by owner

So

DIR /Aq="Stephen Howe"

will list only files created or modified by me.
The q sub-option matches the /q option for DIR

Cheers

Stephen Howe
 

rconn

Administrator
Staff member
May 14, 2008
11,910
133
> .) In TakeCommand, enable optional horizontal scrolling (like the
> console handler for TCC does, with visible / buffer selections). Some
> of our projects have link lines thousands of characters wide.
Not really feasible, because the underlying console window will not support
really wide lines.

Rex Conn
JP Software
 

dim

Dimitry Andric
May 31, 2008
205
1
Netherlands
On 2010-05-05 01:04, rconn wrote:

> I'm finalizing the feature list for v12. If you have suggestions, please post them here or in the Suggestions forum by the end of this week.
A sort of "/M (suppress footer)" option as with the DIR command, for the following commands:

COPY
DEL
MOVE
REN

This would mean "display the file names as they are being copied/deleted/moved/renamed, but do NOT display the 'xxx files copied/deleted/moved/renamed' footer". Sort of the inverse of the /T option that these commands share.

I am not sure I have listed all commands that show such a footer, though. Are there any more of them?
 

rconn

Administrator
Staff member
May 14, 2008
11,910
133
> A sort of "/M (suppress footer)" option as with the DIR command, for
> the following commands:
>
> COPY
> DEL
> MOVE
> REN
>
> This would mean "display the file names as they are being
> copied/deleted/moved/renamed, but do NOT display the 'xxx files
> copied/deleted/moved/renamed' footer". Sort of the inverse of the /T
> option that these commands share.
How would this differ from the existing /ns option?

Rex Conn
JP Software
 
May 20, 2008
3,515
3
Elkridge, MD, USA
| ---Quote---
|| md /c makes the directory and changes to it.
| ---End Quote---
| MD /C creates a compressed subdirectory.

Nevertheless, I currently use aliases to achieve the same goal, so a new
option for MD/MKDIR to combine creating a directory and changing to it would
be very useful.

--
Steve
 

dim

Dimitry Andric
May 31, 2008
205
1
Netherlands
On 2010-05-07 13:56, rconn wrote:

> ---Quote---
>> A sort of "/M (suppress footer)" option as with the DIR command, for
>> the following commands:
>>
>> COPY
>> DEL
>> MOVE
>> REN
>>
>> This would mean "display the file names as they are being
>> copied/deleted/moved/renamed, but do NOT display the 'xxx files
>> copied/deleted/moved/renamed' footer". Sort of the inverse of the /T
>> option that these commands share.
> ---End Quote---
> How would this differ from the existing /ns option?
Ah sorry, I was not aware of that option ('no summary' I presume), and
it works as I described, but it does not seem to be mentioned in the V11
documentation? It is also not mentioned in the /? summaries for the
commands. That should be easy to fix. :)
 

rconn

Administrator
Staff member
May 14, 2008
11,910
133
> Ah sorry, I was not aware of that option ('no summary' I presume), and
> it works as I described, but it does not seem to be mentioned in the
> V11 documentation?
It *is* in the v11 documentation for each of the commands (COPY, DEL, MOVE,
etc.).


> It is also not mentioned in the /? summaries for the
> commands. That should be easy to fix. :)
None of the /N... options are listed in the quick help, nor will they be.
(There's no way to incorporate them without making quick help more
cumbersome than the full help.)

Rex Conn
JP Software
 

Charles Dye

Super Moderator
Staff member
May 20, 2008
4,193
72
Albuquerque, NM
prospero.unm.edu
Not really feasible, because the underlying console window will not support really wide lines.
Well, since most of the recent suggestions seem to involve re-implementing the Windows console manager, I might as well request support for bold, italic, underline, blink, and doublewide attributes. ;-)
 

samintz

Scott Mintz
May 20, 2008
1,413
13
Solon, OH, USA
One of the example aliases from a long time ago (may have been 4DOS days)
was one named ND that did just that.

ND=*md %1 & *cd %1

Another useful one is IN

IN=*pushd %1 & %2$ & *popd

-Scott

w_krieger <> wrote on 05/07/2010 03:36:14 AM:


> md /c makes the directory and changes to it.
>
>
>
>
 

samintz

Scott Mintz
May 20, 2008
1,413
13
Solon, OH, USA
Rex,

Instead of implementing all of these kinds of suggestions, it might be
worthwhile to include a sample ALIAS list with some useful commands.

-Scott

samintz <> wrote on 05/07/2010 10:59:11 AM:


> One of the example aliases from a long time ago (may have been 4DOS
days)

> was one named ND that did just that.
>
> ND=*md %1 & *cd %1
>
> Another useful one is IN
>
> IN=*pushd %1 & %2$ & *popd
>
> -Scott
>
> w_krieger <> wrote on 05/07/2010 03:36:14 AM:
>
>
>
> ---Quote---
> > md /c makes the directory and changes to it.
> >
> >
> >
> >
> ---End Quote---
>
>
>
 
May 20, 2008
603
0
Sammamish, WA
On Thu, May 6, 2010 at 4:33 PM, rconn <> wrote:


> ---Quote---
> > .) In TakeCommand tabs, allow the individual commands to be reordered.
> > If I add a new command, I'd like to group it where it belongs.
> ---End Quote---
> Take Command already has drag & drop for the buttons -- what exactly are
> you
> after?
>
>
>
I have, e.g., 4NT5 and 4NT7. Then I right-clicked the "Untitled" tab, and
said Add Button. In Command, I put C:\4NT6\4NT.EXE, selected Start a new
window, and used "4NT6" for the button label. The buttons said 4NT5, 4NT7,
4NT6. I tried sorting them into 4,5,6 order, but dragging them about doesn't
seem to be possible.

Perhaps I've used poor jargon. What is the right thing to have called it,
and what would I do to reorder these three?


--
Jim Cook
2010 Sundays: 4/4, 6/6, 8/8, 10/10, 12/12 and 5/9, 9/5, 7/11, 11/7.
Next year they're Monday.
 
May 20, 2008
10,555
78
Syracuse, NY, USA
On Fri, 07 May 2010 11:55:12 -0400, Jim Cook <> wrote:

|The buttons said 4NT5, 4NT7,
|4NT6. I tried sorting them into 4,5,6 order, but dragging them about doesn't
|seem to be possible.

You can drag them around only after opening the View ... Toolbars/Menus ...
Customize dialog.
--
- Vince
 

rconn

Administrator
Staff member
May 14, 2008
11,910
133
> I have, e.g., 4NT5 and 4NT7. Then I right-clicked the "Untitled" tab,
> and said Add Button. In Command, I put C:\4NT6\4NT.EXE, selected Start
> a new window, and used "4NT6" for the button label. The buttons said
> 4NT5, 4NT7, 4NT6. I tried sorting them into 4,5,6 order, but dragging
> them about doesn't seem to be possible.
Hold down the alt key while dragging.

Rex Conn
JP Software
 
Dec 7, 2009
235
2
Left Coast, USA
Rex -- apologies if this has already been discussed in this thread or in any others. I have been swamped at work this week and haven't had time to read all the threads. But I'd like to get this request in before the "last call" deadline. I will also apologize for wasting bandwidth if what I'm asking about is already in TCC -- I'm still so new to it, and still in such a 4NT mind-set, that I haven't really done better than scratch the surface of TCC.

The batch debugger is of course useful and is still kind of revolutionary, considering that no other system (that I know of) has any sort of debugger/IDE for shell scripting. But due to its keystroke command-set, BDEBUGGER is much harder to use than the older 4NT system.

The 4NT-era system gave you access to frequently used commands via simple, single keystrokes that were right under your fingertips: step over, step into, etc. The newer system requires keystrokes that aren't right under your fingertips and that sometimes require using both hands -- for example, modifier+function keystrokes, some of which involve somewhat clumsy arm/hand positions.

This is a much slower working method and makes the debugger a lot less user-friendly.

I realize that alphanumeric keystrokes are used in the debugger for text entry. Yet, while one is running the debugger (as opposed to editing), alphanumeric keystrokes don't -- and need not -- switch the IDE into text-entry mode and thus do not impair the functionality in any way. Thus, why not make it possible to use them for executing commands while debugging, whereas they would have their normal text-entry functionality when the debugger is in editing mode?

Therefore, please enable options whereby the user can customize keystrokes that apply to debugging mode, for example to match older and much easier-to-use keystrokes that were available in the 4NT system -- for example, "t" for "step into" and "s" for "step over."

This would be a big change for the better in terms of usability and accessibility -- and especially considering that modern keyboard layouts are if anything less convenient than they were in the past (function keys are no longer on the left, which kind of layout made it way easier to do modifier+function keystrokes with one hand).

It was extremely handy in the 4NT days to be able to insert a "setdos /y1" command into a script being tested, launch the script at the command line, and then go into debugging mode immediately after the "setdos" statement was encountered. This is no longer possible with BDEBUGGER (at least, it wasn't at the time we exchanged forum messages about it before). This to me is also a major loss of important and useful functionality. It would be a great improvement if an "open the script in the debugger and pause here" feature were available again.

Thanks.
 

rconn

Administrator
Staff member
May 14, 2008
11,910
133
> The 4NT-era system gave you access to frequently used commands via
> simple, single keystrokes that were right under your fingertips: step
> over, step into, etc. The newer system requires keystrokes that aren't
> right under your fingertips and that sometimes require using both hands
> -- for example, modifier+function keystrokes, some of which involve
> somewhat clumsy arm/hand positions.
>
> This is a much slower working method and makes the debugger a lot less
> user-friendly.
You can redefine command shortcuts using the Customize toolbar dialog. You
cannot, however, redefine them to alphanumeric keys; this is a Windows
issue.


> It was extremely handy in the 4NT days to be able to insert a "setdos
> /y1" command into a script being tested, launch the script at the
> command line, and then go into debugging mode immediately after the
> "setdos" statement was encountered. This is no longer possible with
> BDEBUGGER (at least, it wasn't at the time we exchanged forum messages
> about it before). This to me is also a major loss of important and
> useful functionality. It would be a great improvement if an "open the
> script in the debugger and pause here" feature were available again.
Use the BREAKPOINT command.

Rex Conn
JP Software
 
Dec 7, 2009
235
2
Left Coast, USA
You can redefine command shortcuts using the Customize toolbar dialog. You cannot, however, redefine them to alphanumeric keys; this is a Windows issue.
I'm not following...can you say a bit more about that?

Use the BREAKPOINT command.
I'd like to follow that up in another thread -- otherwise I think I'll end up too far off-topic in this one.
 

rconn

Administrator
Staff member
May 14, 2008
11,910
133
> ---Quote (Originally by rconn)---
> You can redefine command shortcuts using the Customize toolbar dialog.
> You cannot, however, redefine them to alphanumeric keys; this is a
> Windows issue.
> ---End Quote---
> I'm not following...can you say a bit more about that?
Right click on the debugger toolbar, then click on "Customize".

Rex Conn
JP Software
 
Dec 7, 2009
235
2
Left Coast, USA
>> I'm not following...can you say a bit more about that?

Right click on the debugger toolbar, then click on "Customize"
Sorry, my question was unclear -- I meant about the Windows problem with using the alphanumeric keystrokes.

Once the keystrokes are customized via the use of the Customize button, do these changes work not just within TC but within TCC as well?
 

dim

Dimitry Andric
May 31, 2008
205
1
Netherlands
On 2010-05-07 15:25, rconn wrote:

> It *is* in the v11 documentation for each of the commands (COPY, DEL, MOVE,
> etc.).
My apologies, I had looked for these as a 'full' /NS option, not as a
sub-option of /N.



> None of the /N... options are listed in the quick help, nor will they be.
> (There's no way to incorporate them without making quick help more
> cumbersome than the full help.)
Actually, the summaries does mention them as "/N[dejnst]", so that is
more than enough info for a quick reminder. I should just have learnt
to read better. :)
 

rconn

Administrator
Staff member
May 14, 2008
11,910
133
> Sorry, my question was unclear -- I meant about the Windows problem
> with using the alphanumeric keystrokes.
You cannot define a menu entry as an alphanumeric keystroke; it has to be an
alt or ctrl key combination.


> Once the keystrokes are customized via the use of the Customize button,
> do these changes work not just within TC but within TCC as well?
No, they define menu keystroke shortcuts; tcc doesn't have a menu. If you
want to redefine keys within TCC, use keystroke aliases. (Or if it's a
predefined TCC key, redefine it in TCMD.INI.)

Rex Conn
JP Software
 
Hello Rex,

Not sure if it's too late, but one area I'd like to see expanded is ANSI support. Currently, it only works with TC's output. I'd love to have it work with other applications that output ANSI color sequences.

You mention in the help that the Windows does not natively support this. Not sure if a third party development plug-in does or if there is an ability to map ANSI sequences to windows console attributes.

You'd probably need to be able to turn this on and off as their may be a performance hit to using it.

Thoughts?

Michael
 

rconn

Administrator
Staff member
May 14, 2008
11,910
133
> Not sure if it's too late, but one area I'd like to see expanded is
> ANSI support. Currently, it only works with TC's output. I'd love to
> have it work with other applications that output ANSI color sequences.
>
> You mention in the help that the Windows does not natively support
> this. Not sure if a third party development plug-in does or if there
> is an ability to map ANSI sequences to windows console attributes.
This requires rewriting the Windows console manager; probably several man
years work. I'm definitely not going to be doing it.

Rex Conn
JP Software
 
Jun 24, 2008
223
0
Siegen, Germany
Once more I'd suggest having [tab] work in tokens containing environment variables, like so (^ denotes the cursor position):

dir %systemroot%\a^[tab]*

which - on continuous key presses - should return the nth name in %systemroot% starting with 'a' (w/o the need to expand %systemroot% to e.g. "c:\windows\system32").

Right now one has to use the following command sequence to enumerate the 'a' names:

dir %systemroot%\a^[ctrl-x][tab]*

This sequence also forcibly expands %systemroot% to "c:\windows\system32", which is usually not what is wanted.

nickles