Editing a package

Editing a package

To edit a package, you will use the Package Editor. Consult the Package Editor help topic for complete details on using this editor. Each package is shown as a separate tab across the top. There is also a Package selection box in the toolbar that you can use to jump to a specific package.

The contents of the package are shown in the tree-view on the left. When you click on an item in the tree view, it's details are shown in the panel on the right.


In the list of default packages for your session, you will probably see a package called "Clickable URLs". This package implements triggers that convert any URLs displayed by the server into clickable links.

Perhaps you want to change this package. Maybe you want to add additional protocols that will fire the trigger that creates links. To edit the scripts in this package, click the Settings button in the main toolbar, or select "All Settings" from the View menu. This will open the Package Editor.

By default, the package editor only shows you your main session package. To view the other packages that were loaded, select the "Show Default Packages" option from the View menu. Now you should see each package listed in it's own "tab". Click on the "Clickable URLs" tab to display it.

In the "tree-view" on the left side of the package editor, you can browse the scripts within the package. You'll notice that this package contains a single Module called "Clickable URLs". The icon with the blue arrow means that this module is "published". Only published modules can be used from outside of the package. Within this module are two Triggers that watch for text from the server to convert into links.

Click on the first trigger that contains the "https?|ftp|telnet" string. Change this to read "https?|ftp|telnet|svn".  Now any URIs with the svn:// protocol will also match the trigger.  Note that you haven't just changed the package for this character session. You have just changed the trigger for EVERY session that uses the "Clickable URLs" package.

Even though we have used this package for our simple example, it's actually a really BAD IDEA to change one of the default packages. That's why they are hidden in the package editor normally. Why is this a bad idea? Each time you upgrade TeSSH, it's going to download the standard Clickable URLs package and will overwrite any changes that you made. So it's a bad idea to edit default packages because your changes will easily get lost. The topics Copy an existing package and Create a new package will show you a better ways to change default packages.

But FIRST: go back into the settings editor, click on the first trigger and change it back to "https?|ftp|telnet". Then click Save Changes.

Add comment

Login or register to post comments