From 09b032271b50ceb4a2cf1991f5da86a209886dea Mon Sep 17 00:00:00 2001 From: Ava Hahn Date: Tue, 16 May 2023 10:58:06 -0700 Subject: [PATCH] small docs updates, add trailing slash to autocompleted directories --- Readme.org | 17 +++++++++-------- snippets/userlib.rls | 7 +++---- src/bin/relish.rs | 6 +++--- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/Readme.org b/Readme.org index c5bd085..28470fa 100644 --- a/Readme.org +++ b/Readme.org @@ -485,10 +485,11 @@ Note: this section only tracks the state of incomplete TODO items. Having everyt - Shell module (see branch: fully-interactive-shell) - be able to fg a bg process - be able to list all background processes with j function - - be able to bg and fg process (ctrl z?) - Documentation! -- logging library -- make const all the error messages +- Dogfood this for quite some time +- env prints without using columns +- circuit should actually be (reduce (lambda (form state) (and state (bool form))) my-args) +- rename STL to SLL (standard list library) - make presentation on relish - lisp basics - s expressions @@ -528,20 +529,21 @@ Note: this section only tracks the state of incomplete TODO items. Having everyt - store in repo after giving presentation ** TODO v1.0 tasks -- export function (dump symbol definitions to script and/or append) +- finish basic goals in file:snippets/interactive-devel.rls - then write doc on interactive development +- lambdas shouldn't hit the env - Write next_has member function for &Seg and simplify stdlib and probably also eval/sym - Rename to Flesh - Can pass args to relish scripts (via interpreter) - Can pass args to relish scripts (via command line) - History length configurable - Search delim configurable -- master branch -> main branch - Create a dedicated community channel on matrix.sunnypup.io - Lex function - Read function (Input + Lex) ** TODO v1.1 tasks +- finish stretch goals in file:snippets/interactive-devel.rls - execute configurable function on cd - Post to relevant channels - Custom ast pretty print @@ -561,6 +563,5 @@ Note: this section only tracks the state of incomplete TODO items. Having everyt - TCP Listener - HTTP Listener - UDP Listener -- emacs syntax highlighting and/or LSP implementation -- GNU Guix package -- Bindings for the simplest possible UI library +- Emacs syntax highlighting and/or LSP implementation +- Bindings for the simplest possible UI library? diff --git a/snippets/userlib.rls b/snippets/userlib.rls index af8dd29..b038835 100644 --- a/snippets/userlib.rls +++ b/snippets/userlib.rls @@ -30,22 +30,21 @@ (def set 'sets an existing variable without touching its docstring. -WARNING: abandon hope all ye who declare and then modify global variables! + WARNING: If you find yourself struggling to debug a complex error in state access, or you are having issues re-running commands in the shell consider the following advice: - It is very much an anti pattern to mutate global variable that contain state + It is very much an anti pattern to mutate global variable that contain state. refactor your program: put iterators, counters, procedurally generated code, and all other mutable state into a let loop. - A zen script in relish is one where each root level form (or eval at repl) + A cozy script in relish is one where each root level form (or eval at repl) is self contained, and does not permanently modify any other one. See the userlib tests for an easy to follow example of this.' (var val) - (let ((doc (get-doc var))) (def (eval var) doc val))) diff --git a/src/bin/relish.rs b/src/bin/relish.rs index e5b7acd..021dcbe 100644 --- a/src/bin/relish.rs +++ b/src/bin/relish.rs @@ -148,14 +148,14 @@ impl Completer for CustomCompleter { .as_os_str() .to_str() .expect("bad dir somehow?") - .to_owned(), + .to_owned() + "/", description: None, extra: None, - append_whitespace: false, span: Span { start, end: pos - } + }, + append_whitespace: false }); } }