What's New in Version 33

CMDebug 33.0:

 

CMDebug has been extensively updated to replace much of the old C code with C++, and all of the code has been run through multiple security tools and syntax analyzers to remove all errors and warnings.

 

The Regular Expression analyzer dialog has additional syntax hints.

 

The Scintilla edit control has been updated to version 5.5.2.

 

The Lexilla syntax coloring control has been updated to version 5.4.0.

 

Added support for UTF-16 big-endian files.

 

Added support for opening *.session files on the IDE / BDEBUGGER startup command line.

 

The File main menu has a new submenu "Open Containing Folder":

 

Explorer - Open an Explorer window pointing to the current file

TCC - Open a TCC window in the directory of the current file

CMD - Open a CMD window in the directory of the current file

 

The File main menu has a new option "Open Selected Filename" which will try to open a filename you have highlighted in the edit window. If it is a text file, it will be opened in a new IDE window. If it is an URL (http / https / ftp / ftps) the IDE will open a browser window.

 

The File main menu has a new option "Copy Full Pathname" that will copy the fully expanded name of the file in the current tab window to the clipboard.

 

The File main menu has a new option "File Summary" that pops up a messagebox displaying the full file pathname, creation & last modified date/time, number of characters in the file, number of words, number of lines, number of selections and the number of selected characters.

 

The Find / Replace dialogs and bookmarks have been moved from the Edit main menu to a new "Find" main menu.

 

The Find main menu has a new option "Select All Bookmarks" that will do a (multiple) selection on all lines that have a bookmark.

 

The Edit / Advanced menu has a new option "Reverse Selected Lines" which reverses the line order of the selection.

 

The Edit menu has a new submenu for the Change History:

 

Next Change - Go to the next changed line

Previous Change - Go to the previous changed line

Clear Change History - Clear the change history. Note that this will also clear the undo / redo buffer!

Toggle Change History - Disable or Enable the editor change history

 

The status bar has three new fields: the file encoding type (ASCII, UTF-8, UTF-16, or UTF-16BE), the window size (columns x rows) and the number of lines in the file. The status bar fields can be added / removed by right clicking on the status bar, which displays the "Configure Status Bar" popup.

 

 

TCC-RT:

 

The internal Lua interpreter has been updated to version 5.4.7.

 

The Onigmo Regular Expression library (no longer supported / updated) has been replaced by the Oniguruma library.

 

TCC will now search both HKCU and HKLM for "App Paths" executables.

 

 

Updated Variable Functions:

 

@CHAR[n] - Added support for UTF-16 surrogate code pairs.

 

@LUA - Updated to Lua 5.4.7.

 

@PID[name] - Is much faster if you aren't using wildcards or paths in the file name.

 

@UNICODE[string] - Added support for UTF-16 surrogate code pairs.

 

 

New Variable Functions:

 

@ASCIIX[chars] - like @ASCII, but returns the value(s) in hex.

 

@BUSTYPE[drive:] - returns the bus type for the specified drive. The possible return values are:

 

0 - unspecified

1 - SCSI

2 - ATAPI

3 - ATA

4 - IEEE 1394

5 - SSA

6 - Fibre Channel

7 - USB

8 - RAID

9 - iSCSI

10 - SAS

11 - SATA

12 - SD

13 - MMC

17 - NVME

Anything else returns an empty result

 

@MEDIATYPE[drive:] - returns the media type for the specified drive. The possible return values are:

 

0 - Unspecified

3 - HHD

4 - SSD

5 - SCM

Anything else returns an empty result

 

@TCFONT[n] - returns the current Take Command tab window font name, height, or weight.

 

0 - Font name

1 - Font height in points

2 - Font weight

 

@UNICODEX[chars] - like @UNICODE, but returns the value(s) in hex.

 

@UNIQUEX[filename,create] - Create a unique filename using "filename" as a prefix and appending a UUID. If create is 1, @UNIQUEX will create the file.

 

 

Updated Commands:

 

ACTIVATE

 

CENTER - Centers the specified window (on its current monitor)

 

ALIAS

 

ALIAS now supports regular expressions when displaying aliases. For example:

 

alias ::ab[1-4]

 

COPY

 

/G0 - the percent copied text is written to STDOUT

/G1 - the percent copied text is written directly to the console (this is the default value for /G)

 

DO

 

/Q0 - remove double quotes from the (usually a filename) argument before executing the DO target command.

/Q1 - add enclosing double quotes if the filename contains embedded whitespace or special characters before executing the DO target command.

/Q2 - always add enclosing double quotes around filenames before executing the DO target command.

 

For example:

 

do x in /q1 f*.txt (echo %x)

 

ENDLOCAL

 

/P - Restore the DIRS / PUSHD / POPD directory stack saved by SETLOCAL. (By default ENDLOCAL will not restore the directory stack, for compatibility with CMD.)

 

ENDLOCAL will restore the CWD for drives specified by the SETLOCAL /D option.

 

FOR

 

/Q0 - remove double quotes from the (usually a filename) argument before executing the FOR target command.

/Q1 - add enclosing double quotes if the filename contains embedded whitespace or special characters before executing the FOR target command.

/Q2 - always add enclosing double quotes around filenames before executing the FOR target command.

 

For example:

 

for /q1 %a in (f*.txt) do echo %a

 

FSEARCH

 

FSEARCH now supports > 4gb files.

 

FSEARCH is considerably faster (~30%) than v32 when searching ASCII and UTF-8 files.

 

/A:... - Search for files based on their attributes.

 

You can now search for directory names (but not in combination with text searches). You must specify the start directory. For example:

 

fsearch /a:d /s startdirectory dirname

 

/:0 - All files are assumed to be ASCII. This saves some time because FSEARCH doesn't have to examine each file to see if it is ASCII, UTF-8, or UTF-16.

 

IF

 

IF ISAPP is much faster if you aren't using wildcards or paths in the process name.

 

INTERNAL

 

Added support for variables and variable functions.

 

LUA

 

Updated the Lua interpreter to version 5.4.7.

 

MOVE

 

/G0 - the percent copied text is written to STDOUT

/G1 - the percent copied text is written directly to the console (this is the default value for /G)

 

SETLOCAL

 

/D"drives" - Save the current directory on the specified drives. If you use "*" for the drives argument SETLOCAL will save all of the local drives. ENDLOCAL will restore the CWD on all of the specified drives. For example:

 

SETLOCAL /D"c: d: f: m"

 

SHORTCUT

 

If the app name does not have a path, SHORTCUT will search the current directory first, then the directories in PATH, then the APP PATH directories.

 

There is a new argument to SHORTCUT to specify whether to run the app elevated:

 

SHORTCUT command args dir desc link mode [iconfile [iconoffset [hotkey] [elevated]]]]

elevated - 1 to run the app in an elevated session; 0 to run in a normal session.

 

TEE

 

TEE can now write to the TMPn: pseudo-devices.

 

TOUCH

 

TOUCH can now set fields in the same file using the /R option. For example, to set the creation date/time to the same as the write time:

 

touch /d:c /t:c /r:w file file

 

TPIPE

 

TPIPE has been moved from an external app (TPIPE.EXE) to an internal command. This will improve its performance significantly, particularly after the first time TPIPE is called.

 

WATCH

 

/I - You can optionally specify time in milliseconds instead of seconds by appending an "ms" to the time value. For example:

 

watch /c /v /i4000ms "(echo time=%%_time & echo date=%%_date)"

 

/W - Truncate the output lines at the right column instead of wrapping them to the next line.

 

WHICH

 

WHICH now shows if it found external executables in the Windows Registry "App Paths" (either HKCU or HKLM).

 

WINDOW

 

CENTER - Centers the window (on its current monitor)

 

WSHORTCUT

 

/D now supports Enter to execute the selected line and Ctrl-Enter to display it on the command line for editing (and execution if you press Enter on the command line).

 

 

New Commands:

 

XSORT

 

XSORT sorts text files, standard output, and the clipboard. XSORT supports ASCII, UTF-8, and UTF-16 files, including optionally converting from one encoding format to another.

 

The syntax is:

 

XSORT [/D /R /unicode=in,out /+n /type=n /length=n] [input files] [/output=filename]

 

/output - The filename for the sorted output. If the file already exists, it will be overwritten. If no /output=xxx option is specified, XSORT will write to standard output. XSORT also supports writing to CLIP:

 

type - the sort type

0 ANSI sort (case insensitive, locale specific)

1 ANSI sort (case sensitive, locale-specific)

2 ASCII sort (case insensitive)

3 ASCII sort (case sensitive)

4 Numeric sort. - Sort according to their numeric value. Leading spaces are allowed. The number must be in decimal, and can be in floating point format. Any non-numeric characters after the number are ignored. If the line has no valid numeric value it is given a value of 0. If you have dates formatted in YYYYMMDDHHMMSS order you can easily sort by date based on the value.

5 Sort by length of line - Note that if you also specify /D,  there is no way of knowing which line from a group of lines with the same sort value will be kept. For example, with input of 'AAA', 'BBB', 'CCC' each has a length of 3 and appears to be the same.

6 Sort by date and time - The value must use the current locale’s date/time format. Specifying AM or PM as part of the time is optional, as are the seconds. Use 24-hour time (7:45 PM is entered as 19:45, for example) if AM or PM is not specified.

7 Sort by date - The value must consist of two or three numbers, separated by the character defined by the current's locale's Date Separator. The order for month, day, and year is determined by the current locale. Possible combinations are m/d/y, d/m/y, and y/m/d. If the value contains only two numbers, it is interpreted as a date (m/d or d/m) in the current year.

8 Sort by time - The value must consist of two or three numbers, separated by the character defined by the current's locale's Date Separator. The order for month, day, and year is determined by the current locale. Possible combinations are m/d/y, d/m/y, and y/m/d. If the value contains only two numbers, it is interpreted as a date (m/d or d/m) in the current year.

9 UTF-8 sort (case insensitive)

10 UTF-8 sort (case sensitive)

/D - Remove duplicate lines

/R - Reverse the sort order

/+n - The column to start comparisons from (the default is 1). The Start Column field allows you to ignore leading characters before a comparison is made. When the Start Column is 1, and the Length is 4096 or more, the sort is optimized compared to selecting a subset of each line. All lines are compared for their entire width.

/length=n - The length of the comparison (default is 4096)

/unicode=in,out - The encoding format. XSORT will auto-detect ASCII, UTF-8, and UTF-16 files, so this option is only necessary if you want the input and output encoding to be different. The options for in and out are:

UTF-16LE

UTF-16BE

UTF-32LE

UTF-32BE

UTF-8

ANSI

ASCII

CPnnn, where nnn is a Windows code page (for example, CP437 or CP1251).

 

Anything remaining on the command line is presumed to be one or more input files. If no input file is specified, XSORT will read from standard input. XSORT also supports reading from CLIP: