From 57892b56a4418339b29e8766aa641d3f42e118c9 Mon Sep 17 00:00:00 2001 From: Mart Lubbers Date: Thu, 28 Jan 2016 16:53:05 +0100 Subject: [PATCH] Added last history function descriptions --- README.md | 2 ++ ReadLine.dcl | 6 ++++++ ReadLine.icl | 5 +++++ 3 files changed, 13 insertions(+) diff --git a/README.md b/README.md index 8a70160..9b8977a 100644 --- a/README.md +++ b/README.md @@ -43,6 +43,8 @@ functions as close as possible ###Todo +- Check all functions if more maybe's are needed to handle NULL +- Implement history expansion functions - Use builtin Maybe if available, otherwise fall back on own Maybe - Complete history api implementation - Control over tabcompletion, right now it completes on filenames. diff --git a/ReadLine.dcl b/ReadLine.dcl index 61f7c15..30d3f4d 100644 --- a/ReadLine.dcl +++ b/ReadLine.dcl @@ -59,3 +59,9 @@ readHistoryRange :: !String !Int !Int !*env -> (!Bool, !*env) writeHistory :: !String !*env -> (!Bool, !*env) appendHistory :: !Int !String !*env -> (!Bool, !*env) historyTruncateFile :: !String !Int !*env -> (!Bool, !*env) + +//History Expansion +historyExpand :: !String !*env -> (!String, !Int, !*env) +getHistoryEvent :: !String !Int !Int !*env -> (!String, !*env) +historyTokenize :: !String !*env -> ([String], !*env) +historyArgExtract :: !Int !Int !String !*env -> (!String, !*env) diff --git a/ReadLine.icl b/ReadLine.icl index 64a7fa4..71d64df 100644 --- a/ReadLine.icl +++ b/ReadLine.icl @@ -246,3 +246,8 @@ historyTruncateFile :: !String !Int !*env -> (!Bool, !*env) historyTruncateFile i s e = code { ccall cleanWriteHistory "SI:I:A" } + +historyExpand :: !String !*env -> (!String, !Int, !*env) +getHistoryEvent :: !String !Int !Int !*env -> (!String, !*env) +historyTokenize :: !String !*env -> ([String], !*env) +historyArgExtract :: !Int !Int !String !*env -> (!String, !*env) -- 2.20.1