picolisp

Unnamed repository; edit this file to name it for gitweb.
git clone https://logand.com/git/picolisp.git/
Log | Files | Refs | README | LICENSE

commit 6a373286dd46c2b1d5c2a5c56e3bb559dbe6ebe5
parent b33acfcfa2ebbfe34868d0a48d6bad78aff3fdde
Author: Alexander Burger <abu@software-lab.de>
Date:   Thu, 29 Dec 2011 18:18:24 +0100

More bash completion
Diffstat:
Mlib/complete.l | 31+++++++++++++++++++------------
1 file changed, 19 insertions(+), 12 deletions(-)

diff --git a/lib/complete.l b/lib/complete.l @@ -1,17 +1,24 @@ # 29dec11abu # (c) Software Lab. Alexander Burger -(let "Lst" (chop (opt)) - (if (= "-" (car "Lst")) - (let "Pre" (pop '"Lst") - (when (member (car "Lst") '("\"" "'")) - (setq "Pre" (pop '"Lst")) ) - (let "Str" (pack "Lst") - (for "Sym" (all) - (and (pre? "Str" "Sym") (getd "Sym") (prinl "Pre" "Sym")) ) ) ) - (let ("Path" (rot (split "Lst" "/")) "Str" (pack (car "Path"))) - (setq "Path" (and (cdr "Path") (pack (glue "/" @) "/"))) - (for "Sym" (dir "Path" T) - (and (pre? "Str" "Sym") (prinl "Path" "Sym")) ) ) ) ) +(if (opt) + (let "Lst" (chop @) + (if (= "-" (car "Lst")) + (let "Pre" (pop '"Lst") + (when (member (car "Lst") '("\"" "'")) + (setq "Pre" (pop '"Lst")) ) + (let "Str" (pack "Lst") + (for "Sym" (all) + (and + (pre? "Str" "Sym") + (getd "Sym") + (prinl "Pre" "Sym") ) ) ) ) + (let ("Path" (rot (split "Lst" "/")) "Str" (pack (car "Path"))) + (setq "Path" (and (cdr "Path") (pack (glue "/" @) "/"))) + (for "Sym" (dir "Path" T) + (and + (pre? "Str" "Sym") + (prinl "Path" "Sym") ) ) ) ) ) + (prinl "+ -bye") ) # vi:et:ts=3:sw=3