From: Mart Lubbers Date: Thu, 28 Jan 2016 15:53:05 +0000 (+0100) Subject: Added last history function descriptions X-Git-Tag: v0.4~2 X-Git-Url: https://git.martlubbers.net/?a=commitdiff_plain;h=57892b56a4418339b29e8766aa641d3f42e118c9;p=CleanReadLine.git Added last history function descriptions --- 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)