TEXTCMD — Interpret commands at a text-mode command prompt

Synopsis

TEXTCMD [/?] [/Q/S] [/C|/K] [/MAXHIST lines] [/MINHISTLEN characters] [/NOSLASHDIR[+|-]] [/CURSOR insert,overwrite] [/WRAPHISTORY[+|-]] [/APPENDHISTORY[+|-]] [/MATCHHISTORY[+|-]] [/PRIVATEINSERTMODE[+|-]] [/STICKYINSERTMODE[+|-]] [/INSERTMODE[+|-]] [/ONETAIL[+|-]] [/AUTOSTARTPM[+|-]] [/AUTOSTARTVDM[+|-]] [commands]

Options

/?
Display command syntax information.
/Q
Set the echo flag to "OFF" initially instead of "ON".
/S
Do not claim the signal exception focus.
/C
Force non-interactive mode.
/K
Force interactive mode. This is the default.
/CURSOR
Specify the sizes of the cursor, as percentages, for insert and overwrite mode.
/ONETAIL
Work around a bug in a few programs .
/MAXHIST
Specify the maximum number of command lines to retain for recall. (Default: 1024)
/MINHISTLEN
Specify the minimum size that a line must have for it to be implicitly added to the command line history. (Default: 0)
/WRAPHISTORY
Control whether or not the current position in the history list can wrap around to the other extreme when it is at the start or the end of the list. (Default: no wrap)
/APPENDHISTORY
Control whether or not all entered lines are appended unconditionally to the end of the history list and the current position reset to the end of the list. (Default: no append)
/MATCHHISTORY
Control whether or not the beginnings of lines must match the entered prefix when recalling lines from the command line history. (Default: match)
/NOSLASHDIR
Control whether or not a slash is appended to the names of any directories that are found during filename completion. (Default: no slash)
/INSERTMODE
Specify the (initial) state of the private insert/overwrite mode flag. (Default: insert mode)

Note: The private insert/overwrite flag is ignored unless the /PRIVATEINSERTMODE option is on.

/STICKYINSERTMODE
Do not reset the private insert/overwrite mode flag to the initial state at each new line. (Default: the flag is not reset)

Note: The private insert/overwrite flag is ignored unless the /PRIVATEINSERTMODE option is on.

/PRIVATEINSERTMODE
Use the private insert/overwrite mode flag instead of the operating system's flag. (Default: use the operating system's flag)
/AUTOSTARTVDM
Start DOS programs in separate sessions. (Default: off)
/AUTOSTARTPM
Start PM programs in separate sessions. (Default: off)

Note: All options must precede any other arguments on the command line. The first non-option word on the command line will cause option processing to finish.

Description

An instance of the 32-bit Command Interpreter is started with the TEXTCMD command.

The command interpreter first processes the contents of the CMD_TEXTCMD_INIT environment variable, if it has inherited one, as if it were a command tail, then it processes all of the command tails that have been passed to it. This can be useful for setting the /CURSOR, /WRAPHISTORY, /APPENDHISTORY, and /MATCHHISTORY options globally for all instances of the command interpreter, and for pre-populating the command line history with the HISTORY command.

If non-option arguments are supplied, they are treated as a command line to be executed. For compatibility with the 16-bit CMD supplied with IBM OS/2, if the first non-whitespace character in the command line is a pair of quotation marks, both it and the last quotation mark character on the line (if any) will be removed before the command line is executed.

Once these commands have been executed, the command interpreter by default enters interactive mode, unless the /C option has been specified.

The return code from the command interpreter is the return code from the last command to be run. If the /C option is used, this will be the return code from the command given in the arguments. This is different from the 16-bit CMD supplied with IBM OS/2, which usually, but not always, returns the code of the last relevant system error generated when running (or trying to invoke) the command.

Interactive mode

In interactive mode, the TEXTCMD command repeatedly prints a prompt to its standard output and reads a line of text directly from the console. (TEXTCMD does not read from its standard input.) Each line of text is treated as a command line to be executed. To exit interactive mode, and thereby terminate the command interpreter process, use the built-in EXIT command.

See TEXTCMD command line editing and recall .

CMD PMCMD


The 32-bit Command Interpreter is © Copyright Jonathan de Boyne Pollard. "Moral" rights are asserted.