Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

Console life a bit over-expressive? Try dir-utils

 [1/6] from: arolls::bigpond::net::au at: 14-Dec-2000 0:55


Hello everyone, I have recently made available a set of filesystem navigation functions for all to enjoy. Included are such classics (that we all know and love) as: 'cd - change directory (directory argument optional :) 'ls - list directory contents (with optional pattern matching) 'dir - list sub-directories and 'wd ~= what-dir I do %dir-utils.r in my user.r file and it makes my life much easier. (I don't have to crawl out of my shell.) Find it here: http://users.bigpond.net.au/datababies/anton/rebol/dir-utils.r I have tested these functions on REBOL/Core 2.3.0.3.1 24-Jun-2000 (win2k) REBOL/View 0.10.38.3.1 28-Nov-2000 (win2k) Yours sincerely, Anton.

 [2/6] from: rchristiansen:pop:isdfa:sei-it at: 13-Dec-2000 15:04


Thank you for this script. I have wanted some bash functions in the console for some time, but I was too lazy to write them up myself.

 [3/6] from: gchiu:compkarori at: 14-Dec-2000 17:58


Hi Anton
> 'cd - change directory (directory argument optional :)
With a large directory, this creates a view which is deeper than my screen, and which can't be accessed. On NT4 SP5. -- Graham Chiu

 [4/6] from: arolls:bigpond:au at: 14-Dec-2000 16:27


Yes, sorry about that. I want to implement a scroll bar if it gets too big. I am not sure how at the moment. Anyone with a pointer to a nice example of a list and updating slider? Anton.

 [5/6] from: jelinem1:nationwide at: 14-Dec-2000 9:57


Anton, Way ahead of you, although your efforts are commendable nonetheless. Actually your efforts are abit better than mine for you published yours. Although...did I post an early version of my shell.r to one of the REBOL repositories? Anyway, I took your pattern matching from the directory listing function. As simple as this is I was too lazy to create the code for it. My shell.r contains a few extra functions that I just use all the time, not necessarily outside of a program (script). shell.r also contains things like: 'rgrep - don't expect regular expressions! 'include - requires setting a "global" 'lib-path to where your library scripts are 'disp - displays the "first layer" contents of an object, list, or associative array 'rejoin - redefines this word with a 'with refinement an object template for defining a 'counter http://members.home.net/michael1356/shell.r - Michael Jelinek Anton <[arolls--bigpond--net--au]>@rebol.com on 12/13/2000 07:55:46 AM From: "Anton" <[arolls--bigpond--net--au]>@rebol.com on 12/13/2000 07:55 AM Please respond to [rebol-list--rebol--com] Sent by: [rebol-bounce--rebol--com] To: <[rebol-list--rebol--com]> cc: Subject: [REBOL] Console life a bit over-expressive? Try dir-utils Hello everyone, I have recently made available a set of filesystem navigation functions for all to enjoy. Included are such classics (that we all know and love) as: 'cd - change directory (directory argument optional :) 'ls - list directory contents (with optional pattern matching) 'dir - list sub-directories and 'wd ~= what-dir I do %dir-utils.r in my user.r file and it makes my life much easier. (I don't have to crawl out of my shell.) Find it here: http://users.bigpond.net.au/datababies/anton/rebol/dir-utils.r I have tested these functions on REBOL/Core 2.3.0.3.1 24-Jun-2000 (win2k) REBOL/View 0.10.38.3.1 28-Nov-2000 (win2k) Yours sincerely, Anton.

 [6/6] from: d4marcus:dtek:chalmers:se at: 15-Dec-2000 18:27


On Thu, 14 Dec 2000, Anton wrote:
> I want to implement a scroll bar if it gets too big. I am not sure > how at the moment. Anyone with a pointer to a nice example of a > list and updating slider?
I was close to suggesting "source request-file", but it seems that the source returned when you examine this function is not complete. However, if you have a new version of View (with the test panel), you can have a look at the source of demo-init. For example (rebolv is View): rebolv --do "source demo-init" > demo-init.r Then search demo-init.r for slider. You'll find something similar to this - I have trimmed it here to get the important parts: l: layout [ size 640x320 origin 0 space 0 across t1: area 624x320 s1: slider 16x320 [scroll-para t1 s1] ; ties the slider to the area ] t1/text: read %demo-init.r size: size-text t1 s1/redrag 320 / size/y ; to get a proportional handle Ok, so a list is a bit different than a text, but you should be able to work it out. Marcus ------------------------------------ If you find that life spits on you calm down and pretend it's raining