[REBOL] Re: Basic Script Calling Command
From: antonr:iinet:au at: 5-Nov-2003 17:43
I don't know the answer to that, but
I have made dir-utils.r, with more powerful
cd and ls functions. I use them constantly.
http://www.lexicon.net/anton/rebol/library/dir-utils.r
You can extract the functions from that object
and stick them in your user.r or you could use my include
function. Full example:
site: select load-thru http://www.reboltech.com/index.r [folder "Anton"]
clear find site %index.r
do load-thru site/library/include.r
include [
site/library/dir-utils.r [cd ls] ; there are other functions
]
; now you can use cd and ls in console... eg.
; ls/info
Find the code in your public cache here:
path-thru site/library/dir-utils.r
If I were you, I'd also define a function edit which
launches your preferred native editor. Very handy.
Here's mine on windows.
edit: func ["Open native editor"
file [file! string!] "document to open in editor (can be empty string)"
/local exe
][
exe: %/d/Anton/Dev/EditPlus/EditPlus.exe
call reform [
either file? exe [to-local-file clean-path exe] [exe]
either file? file [to-local-file clean-path file] [file]
]
]
Anton.