{ "name": "libedit", "version": "20260512-3.1", "summary": "libedit (editline): line editing, history and a tokenizer, the BSD alternative to readline", "category": "library", "license": "BSD-3-Clause", "homepage": "https://thrysoee.dk/editline/", "source": { "url": "https://thrysoee.dk/editline/libedit-20260512-3.1.tar.gz", "sha256": "432d5e7ea8b0116dd39f2eca7bc11d0eed77faa6b77ea526ace89907c23ea4a0" }, "watch": {"kind": "index", "url": "https://thrysoee.dk/editline/", "regex": "libedit-(?P[0-9]{8}-[0-9]+(?:\\.[0-9]+)+)\\.tar\\.gz", "pin": "any"}, "deps": [ "ncurses" ], "env_packages": [], "static": true, "nss": true, "check": "t=$(mktemp -d) && check_lib libedit histedit.h 'HistEvent ev; History *h = history_init(); Tokenizer *tk = tok_init(NULL); int argc, n, bad; const char **argv; history(h, &ev, H_SETSIZE, 10); history(h, &ev, H_ENTER, \"first line\"); history(h, &ev, H_ENTER, \"second \\\"quoted words\\\" here\"); history(h, &ev, H_GETSIZE); n = ev.num; tok_str(tk, \"second \\\"quoted words\\\" here\", &argc, &argv); printf(\"libedit: %d history entries, %d words, the second is %s\\n\", n, argc, argv[1]); bad = n != 2 || argc != 3 || strcmp(argv[1], \"quoted words\"); tok_end(tk); history_end(h); return bad' > \"$t/lib\" && echo 'libedit 20260512-3.1: two lines in the history and a quoted line split into three words, through check_lib'" }