From 233e84bdf450fe33b945bc30fb39f8fb835f5b42 Mon Sep 17 00:00:00 2001 From: John Benediktsson Date: Fri, 11 Jan 2013 11:37:59 -0800 Subject: [PATCH] tools.which: cleanup code a little. --- extra/tools/which/which.factor | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/extra/tools/which/which.factor b/extra/tools/which/which.factor index 68c734b1dd..95d584dd97 100644 --- a/extra/tools/which/which.factor +++ b/extra/tools/which/which.factor @@ -9,19 +9,6 @@ IN: tools.which lower ] bi@ tail? ] with any? @@ -41,7 +31,7 @@ IN: tools.which [ prepend-path ] { } assoc>map [ executable? ] find nip ; -: (which) ( command paths -- file/f ) +: (which) ( command path -- file/f ) split-path os windows? [ [ path-extensions ] [ "." prefix ] bi* ] [ [ 1array ] dip ] if ((which)) ; @@ -49,4 +39,4 @@ IN: tools.which PRIVATE> : which ( command -- file/f ) - current-path (which) ; + "PATH" os-env (which) ;