Other TCC Tweaks, Tips, and Tricks
Other TCC Tweaks, Tips, and Tricks
There are a variety of other settings which you can adjust to make TCC behave the way you want it to. Here are several worth experimenting with. Most are entirely a matter of taste.
“Default edit mode”: This setting, on the Command Line tab of the OPTION dialog, selects whether the command-line editor defaults to insert or overstrike mode. “Overstrike” or“Insert” sets the specified mode at the start of each new command line. “Initial Overstrike” or “Initial Insert” sets the specified mode when TCC starts, but retains the current setting from one line to the next. You will probably want the cursor to indicate the current editing mode. Cursor shapes are also defined on this tab with the fields labeled “Overstrike Cursor” and “Insert Cursor”. You might prefer a small cursor, say 15%, for your preferred default editing mode, and a larger cursor, 100%, for the other mode.
The “Copy to end” and “Move to end“ options, also on the Command Line tab, control the behavior of the command history. If “Copy to end” is on, then re-executing a command from the history will cause a new copy of that command to be added to the end of the command history. If “Copy to end” is off and “Move to end” is on, then re-executing a command from the history will move it to the end of the command history. If both options are off, then re-executing a command from history will not affect the command history. Personally, I find “Copy to end” on the most intuitive behavior.
On the Startup tab of the OPTION dialog are a couple of handy safety options. “Prompt on Wildcard Deletes” gives you an opportunity to confirm when performing mass deletions. It defaults to on; you can turn it off if you never make mistakes with DEL or RD /S. Just below it is “COPY Prompt on Overwrite”, which prompts you when a COPY or MOVE command at the prompt would overwrite a file in the target directory. This setting is only effective at the prompt, not in batch files; it defaults to off. It's worth turning on, unless you never make mistakes with COPY or MOVE.
Also on the Startup tab are options to make the command history, directory history, the alias list, and the function list either local or global. Local lists are specific to each instance of TCC; global lists are shared between all instances. If you want changes made in one TCC shell to be reflected in other running shells, you will prefer global lists. If you want each instance of TCC to be insulated from all others, with its own private command history, directory history, alias list, and so on, then local is the way to go. These settings are largely a matter of personal preference, so experiment with them. While you can set each one individually, it's likely that you will want to set all four the same way.
The “Default Beep” settings, found on the Advanced tab of the OPTION dialog, define the tone TCC makes for some error conditions in command-line editing, such as pressing an undefined key or attempting filename completion when nothing matches. They are also used by the BEEP command with no arguments. “Length” sets the duration, in units of approximately one-eighteenth a second; a length of zero disables the default beep completely. “Frequency”sets the pitch, in cycles per second.
Finally, on the Startup tab, you'll find an option labeled“Protect Redirected Output Files” (this option is often called NoClobber, after a similar option in Unix shells.) Unlike most of the tweaks described here, this option is not just a matter of taste; it makes significant changes to the handling of output redirection. Turning “Protect Redirected Output Files” on helps guard against mistyped filenames in redirections, but also introduces incompatibilities with CMD.EXE. If this option is on, the redirection operators which normally create a new file (>, >&, and >&>) will check that the specified file does not yet exist, and abort the command with an error message instead of overwriting an existing file. The redirection operators which are normally used to append to an existing file (>>, >>&, and >>&>) will check that the specified file does exist, and abort with an error message if it does not. The default is off.
“Protect Redirected Output Files” is a useful safety feature and can encourage good habits as well as preventing accidental data loss. However, it can break existing batch files which are not NoClobber-aware. I suggest turning this option on if you use Take Command as your primary shell and write your own batch files for it; leave it off if you have a large number of batch files written for CMD.EXE. (NoClobber support can also be changed dynamically in a batch file or at the command line with SETDOS /N.)
Copyright © 2011-2020, Charles Dye