From c76ec0cfeb6a1b5cb6a5e5c6734f62fc9f61a326 Mon Sep 17 00:00:00 2001 From: Sergey Mikhaylenko Date: Wed, 27 Dec 2023 16:21:22 +0300 Subject: [PATCH] Add one line to the history of the IRIS terminal for Linux It is very convenient to insert commands into the iris.script file, for example, to test a module in terminal mode. --- src/dc/one/Line.cls | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/dc/one/Line.cls b/src/dc/one/Line.cls index f78781a..7e1e32b 100644 --- a/src/dc/one/Line.cls +++ b/src/dc/one/Line.cls @@ -4,6 +4,15 @@ Include dc.one.Line Class dc.one.Line { +/// Add one line to the history of the IRIS terminal for Linux. It is very convenient to insert commands into the iris.script file, for example, to test a module in terminal mode. +/// Samples: +/// if $zf(-1,"echo ':do 1^%SS' >> ~/.iris_history") +ClassMethod Add2History() +{ + if $zf(-1,"echo ':zpm ""test my-module""' >> ~/.iris_history") +} + + /// Add a one-line Z-command /// Samples: /// set line="ZPMN(m="""") new $namespace zpm ""zn ""_m_""*"" quit" do ##class(dc.one.Line).AddLineInZZCommand(line)