Editing shell or Perl code in the Edit Step page Command box can be painful when you are used to editing code in your favorite editor. If you are communicating with the ElectricCommander server through the Perl API, you may find typing in the Command text box easy enough. If not, other text editing solutions are available.
See the links in the "See Also" section for two other text editing solutions.
If using Emacs, create a Perl script that uses the Commander Perl API to get the Command field for a procedure’s step and then feed it to the emacsclient so you can make edits locally. The script waits for you to save changes and then updates the contents of the Command field in the step with your changes.
The script reads the following environment variables: COMMANDER_SERVER, COMMANDER_PORT, and COMMANDER_SESSIONID to determine the server and login to use. If these are not set, it defaults to localhost:8000 and
Save the script attached to this page as "eced", then invoke it with the
stepName as arguments. When finished editing, type
C-x # in Emacs to close the window and save the contents to the step.
Here are two solutions you may find better than the one described here. They provide the ability to edit any text area item and to use Emacs key bindings.
It’s all Text
Emacs key bindings