insh

EsbRootView is equipped with the core of a Bourne like shell called "insh" for INlib SHell.

It had been introduced to have a way to customize things by using a scripting syntax known by any UNIX pedestrian and easily implementable by a "doer" without having to embarque a million of lines of code to do that. insh has the basic mechanisms found on any bash shell: variables, env variables, dollar replacement of a variable, execute other scripts, source other scripts and, obviously, execute commands with options. For example in mctrack_wcpoint.insh, executed from event.insh at each 'next event', you can see:

    ...
    event_index=`event_index`
    gui_show_console ${event_index}
    scene_clear_dynamic
    #pickable='-pickable=true'
    pickable=
    MCTrack_vis -cut=${cut_first} -color=${mc_ophoton_first_color} ${pickable}
    WCDetectorPoint_vis -cut=${cut_first} -color=${wc_ophoton_first_color} ${pickable} -point_size=1
    # this is a comment.
    ...   

As for a Bourne shell, at startup of the program, the internal insh will execute, if found and in this order, the files:

    ~/.insh                               # sourced.
    ~/Documents/EsbRootView/.insh         # sourced.
    ~/Documents/EsbRootView/init.insh     # not sourced.
    ~/Documents/EsbRootView/startup.insh  # not sourced.

For example, in a .insh, you can have:

    echo 'hello my .insh'