this is the corrected function:
(bye (if (vip~vi ## [+<pat> | +[<num>]] <file1> [+[<num>]] <file2> .. (make (while (opt) (let S @ (cond ((pre? "+" S) (link (cons (cond ((= "+" S) T) ((format S) @) (T (cdr (chop S))) ) (opt) ) ) ) ((pre? "-" S) (load (pack (cdr (chop S))))) (T (link S)) ) ) ) ) ) 0 1 ) ) On Thu, May 13, 2021 at 5:39 PM polifemo <brunofrancosala...@gmail.com> wrote: > I realized the source of my previous loading problem: > > (bye > (if > (vip~vi > (make > (while (opt) > (let S @ > (cond > ((pre? "+" S) > (link > (cons > (cond > ((= "+" S) T) > ((format S) @) > (T (cdr (chop S))) ) > (opt) ) ) ) > ->>> ((pre? "-" S) (load S)) > (T (link S)) ) ) ) ) ) > 0 > 1 ) ) > `((pre? "-" S) (load S))` this is the offending line: it checks if the > argument string starts with a "-" to load it, but then it does not get rid > of it, so it looks for the file with a "-" prepended. > > In summary, if you write `vip -@file.l hello`, it will try to load a file > named "-file.l", instead of "file.l" >