3 | | | |__) |__) | | | |__)
4 \___ \__/ | \ | \ _|___/ _|_ | \
6 © 1 9 9 4 S t r a y l i g h t
7 ___________________________________________________________
11 For some reason, people appear to like to have the current
12 directory in their command prompts. Indeed, I wrote a code
13 variable to do this last November. Following a discussion
14 on c.s.a recently, I decided to upgrade my program for
15 doing this, and then, out of the kindness of my heart, give
16 it away. Nutty, isn't it?
18 So what makes Straylight currDir better than the other
19 current-directory-in-a-code-variable utilities around?
20 Well, for a start, it was written by Straylight. For
23 * It does it the `right way' by using OS_FSControl 37
24 (CanonicalisePath) on the string `@' which avoids
25 problems with the mangling-system-variables approach,
26 which can go badly wrong.
28 * It allows you to specify the variable name, so you can
29 have lots of different variables with different options,
32 * It allows you to specify a `maximum length', beyond which
33 the path name is truncated, so that the path string
34 doesn't fill up the whole width of the screen.
36 The truncation is fairly sensible. It will attempt to show
37 you the filing system and disk name, if there is one, and
38 will chop off the beginning, rather than the end, of the
41 scsi::Wintermute.$.Straylight.Software.Freeware.Dynamite
45 scsi::Wintermute.$...tware.Free.Dynamite
47 As you have no doubt noticed, an ellipsis (`...') is
48 inserted to show that characters have been removed.
49 ___________________________________________________________
53 At simplest, just double-click on the `currDir'
54 application. This will create a system variable called
55 `CSD' which contains your full current directory path. You
56 could then put in your prompt with a command like
58 SetMacro CLI$Prompt [<CSD>]
60 If you want to create a different variable, use the `-var'
63 currDir -var My$Variable
65 If you want to specify a maximum length, use the `-maxLen'
70 will ensure that the name never exceeds 40 characters.
72 You can't remove these variables in the normal way --
73 *Unset will silently ignore your attempts. Therefore
74 currDir has a `-remove' option which you can use, in
75 conjunction with `-var' if necessary, to kill a variable if
76 you don't want it any more.
78 If you're stuck, typing
82 will provide you with some addmittedly fairly terse
84 ___________________________________________________________
88 currDir is written as an application since it can
89 safely quit once it has set up the actual code variable.
90 Making it a Utility was a possibility, but that can have
91 the nasty side-effect of fragmenting the module area. It's
92 unlikely you'll want to use it from anything other than the
93 command line, so it shouldn't be that much of a problem.
94 The program needs a little over 2K to run, so as long as
95 you have a page of memory free you won't have any problems
98 currDir was written in an evening, using the Acorn ARM
99 Assembler, which is jolly good, and I recommend it.
100 ___________________________________________________________