In a Command Tool, the Term Pane pop-up menu has the Edit, Find, and Extras items of the standard text editing pop-up menu (described in Chapter 3, Text Editor), plus three additional items: the History, File Editor, and Scrolling submenus. Move the pointer anywhere onto the Command Tool pane and press MENU to display the Term Pane menu.
The History of a Command Tool is a log of all the characters displayed. You can access this log by scrolling the Term Pane with the scrollbar or by saving the log to a file. This may be useful, for example, if you have performed a complicated sequence of operations that you want to save or send as part of a mail message for troubleshooting or debugging. The History submenu provides options to modify the history log.
The Mode setting determines whether the history log is Editable within the Command Tool, or Read Only. If you set the mode to Read Only in order to protect against accidental changes, you can still save the log to a file and edit that file using the File Editor option described in the next section. If the mode is editable, you can edit text anywhere in the Term Pane and use the editing items on the Term Pane menu. See Chapter 3, Text Editor for information on the editing functions.
When you choose this option, the Text: Save As window is displayed. For complete information on saving files refer to Chapter 1, Introduction to the Solaris User Environment.
You can treat this new file as you would any other text file. You can edit it and save it again or drag and drop it from the File Manager onto a Mail Tool Compose or Text Editor window.
This resets the Command Tool history log as if you just started the Command Tool application. (This does not change the output of the UNIX history command.)
The items on the File Editor submenu determine whether a Text Editor Pane is displayed. When you enable the File Editor, the Command Tool is split into two panes: a Command Tool pane and a Text Editor pane. The Text Editor pane is described in Chapter 3, Text Editor. Figure 6-2 shows a Command Tool with the File Editor enabled.
You can access all of the files and directories in your file system from the Command Tool. Use of the Command Tool requires familiarity with the operating system and with your file system.
In the sample session that follows, the cd command changes directories to your home directory, the mkdir command creates a new directory there, and the cp command copies that directory to a new directory with a different name. You execute each command when you press Return at the end of the command line.
example% cd (Press Return) example% mkdir Directory1 (Press Return) example% cp -r Directory1 Directory2 (Press Return)
The Command Tool is a scrolling window. The scrollbar at the side of the window enables you to go back and view commands that are no longer visible in the window. You can scroll back to see the commands typed during the entire life of the window.
In the Command Tool, the command line can be edited. You can move the pointer to any location on the command that you have typed and click SELECT to position the insert point there. You can then type in that location or erase the previously typed characters and retype that portion of the command. Figure 6-3 shows the insert point.
Command Tool can be used as a Text Editor window at any time. The advantage to this is that you do not need to know a command line editor such as vi. To enable the Command Tool text editing window, move the pointer onto the window pane, press the MENU button, drag the pointer down to highlight File Editor, and then to the right to highlight Enable. The Command Tool pane splits in two; the top pane remains as Command Tool, while the bottom pane becomes a Text Editor.
See the "Text Editor" section for an introduction to the commands in the Command Tool File Editor.
To return to the basic Command Tool, position the pointer in the top pane and choose File Editor -> Disable.