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) ;