Configuring Shell-Based Featuresindextouraddonsguidereference
Available on the App StoreConfiguring Shell-Based FeaturesiAnnotateiReadAji ReaderAji AnnotateTripleQuick FictionTouchTerm ProTouchTermLexelDVDmote
Location-Based Actions Back to Contents

Section 4.7: Configuring Shell-Based Features


Directory Navigation | Persistent Connections

TouchTerm includes several Advanced Options which allow you to fine-tune the behavior of features that rely on shell-based commands on the remote host.

Please exercise caution when changing any of these parameters, and ensure you know exactly the effects of making any changes. Improper changes could causes erratic behavior, and undesired commands to be executed on your remote host.


Directory Navigation (Back to Top)

Directory navigation works by executing standard Unix commands (pwd, cd, and ls) on the remote host, and then processing the output results and updating the TouchTerm interface appropriately.

In a nutshell, TT performs the following when launching Directory Navigation Mode:

  bash-3.2$ pwd; echo MAGIC_TOKEN
  /Users/jbrink/test
  MAGIC_TOKEN
  bash-3.2$ /bin/ls -1F | grep /; echo MAGIC_TOKEN
  folder1/
  folder2/
  MAGIC_TOKEN
  bash-3.2$ cd folder1/; echo MAGIC_TOKEN
  MAGIC_TOKEN
  bash-3.2$

The MAGIC_TOKEN is used for processing the output: when TouchTerm sees the MAGIC_TOKEN, it knows that the output of the current command is complete, and can report the results back to the Directory Navigation system.

As outlined above, the Directory Navigation system first uses a pwd to identify the current directory, and then executes /bin/ls -1F to get a clean listing of all files. This listing is (optionally) filtered to directories only using the grep / command. Finally, a cd is performed whenever a directory change is initiated.

All of these commands can be controlled using Advanced Options; the only reason you should ever need to change these is if the standard commands don't work, for example if the binaries are in different locations on your remote system, or if the default directory commands for your system are different (e.g., for a non-Unix system).

Use the List Files Command option to control the command to use for ls. Use the List .* Files Command option to control the command used when the List .* Files option is On (for "hidden" files). Use the Directory Grep Command option to control the command used for filtering out non-directories from the list; this only pertains when the List Directories Only option is On. Finally, use the Magic Token option to change the value of the magic token used in command processing. (You should only need to change this in the rare case that you have a file or directory name on your system that matches the magic token.) For more details, see the Help Topics for these options.


Persistent Connections (Back to Top)

When using Persistent Connections, you may need more explicit control over the command used when starting the screen session, especially when using a non-standard version of screen, or if your screen binary is in a non-standard location.

Use the Screen Command option to control the command that TouchTerm uses when connecting to the remote host using screen. For reference, the default command is:

  /usr/bin/screen -S TouchTerm -T vt100 -D -R
                      -U -A -l -m -e^Aa -c /dev/null

(The full command on one line.) Note that most of these options are required for proper interaction with TouchTerm; do not change any option unless you have a specific need to, and are certain that it won't affect TouchTerm's interaction. See the manual page for screen for more details on these options.




Location-Based Actions Back to Contents