Terminal Multi-Line Command Editor


Follow
2
Star
5
Details
Version history
Issues
This application is not supported by InterSystems Corporation. Use it at your own risk.

What's new in this version

added image

Terminal Multi-Line Input + Editor
This is a coding example working on IRIS 2020.1 and on Caché 2018.1.3 
It will not be kept in sync with new versions      
It is also NOT serviced by InterSystems Support !   

Terminal Multi-Line Command Editor

Terminal Multi-Line Input with Edit, Insert, Delete, Print extension for IRIS and Caché
IRIS and Caché have just single command lines in terminal available
This Multi-Line Commands Editor also will execute the Multi-line Commands.
In addtiion, it is independent of access to %SYS and can be installed in any namespace

It is tested on IRIS/Caché Terminal , Putty, Linux Console, Docker Console,
Desktop Docker from Windows Command and WebTerminal.

This broad range of terminal emulations required navigation without any <ESC> sequences
as some of them are quite restrictive on input. So it got a little bit feeling like vi.

Installation & Execution

Import ZME.xml to any namespace.

For a system-wide installation in %SYS just rename it from zme to %zme
You may also add this line to your %ZLANGC00.mac for simplified use:

ZME do ^%zme quit  ; add multi line command editor  

Otherwise, just call it from terminal command prompt

  USER>do ^zme  

Usage

at the prompt USER:zme>1
enter commands as usual in terminal
trigger execution by an empty line with <enter>

These Editor Commands are implemented:

    USER>d ^zme
 
    Entering multi line mode.
    <enter> => Run multi-line command.
    . => Stop multi-line mode
    .i, .i<line> => Insert new empty line after <line>
    .d, .d<line>, .d<linefrom>:<lineto> => Delete lines
    .p, .p<line>, .p<linefrom>:<lineto> => Show lines
    .? => show this help
    .e, .e<line> => Edit line

    ***** line editing commands *****
    .+ => move edit cursor forward
    .- => move edit cursor backward
    .nn => move edit cursor to position nn
    .r => set mode replace at cursor
    .i => set mode insert after cursor
    .d => delete character at cursor
    <enter> => teminate line editing
    <any character> => replace / insert after cursor
    .. => input single .

    USER:zml>1

Article in DC

ZPM installation
zpm "install terminal-multiline-editor"
Category
Technology Example
Works with
CachéEnsembleHealthShareInterSystems IRISInterSystems IRIS for Health
Tags
Info
Version
1.0.6
Last updated
2020-07-25
Repository
Open
Documentation
Open
License
Link