tim@attila.esa.oz (Tim Bunce) (10/09/88)
The following may be of interest to Apollo DM users (sufferers :-)
Part 1 provides a usefull prompt and a seperate display of the
directory stack. Also provided are aliases which allow rapid
movement within the directories on the stack.
Note: These are for csh users only.
The prompt looks something like:
[4 ~/test/src]62:
stack depth -^
current directory --^ (note the ~ for home directory)
current command number ---^
The DM message (bottom right hand) window looks something like:
.---------------------------------------------------.
| ~/test/src 1~ 2~/bin 3/usr/lib 4. . . |
`---------------------------------------------------'
Showing the full directory stack with numbers for elements 1 to 4.
Aliases provide the following:
+ dir Push dir onto the top of the stack
- Pop the current directory off the top of the stack
= dir Change top directory to dir
0 Update prompt and stack display (after window change etc)
1 Swap the current (top) directory with element 1
2 Swap '' '' '' 2
3 ... 3
... more could be defined.
I have also defined my F0 to F4 to as, say: KD ES '0'; EN KE
This makes zipping from place to place a real treat!
Part 1 source:
set histchars="@" # prevent hassle from '!' chars
# the next three lines need to be on one very long line
# NOT on seperate lines as shown here.
alias 0 'set noglob; set D=`dirs`; set E=($D . . .); \
set prompt="[$#D $E[1]]\!: "; unset noglob; \
/com/xdmc msg "'\''$E[1] 1$E[2] 2$E[3] 3$E[4-]'\''"'
# don't hassle me about quoting till you've tried it!
alias cd 'chdir !*; 0'
alias '=' cd
alias '-' 'popd !*; 0'
alias '+' 'pushd !*; 0'
alias 1 'pushd +1; 0'
alias 2 'pushd +2; 0'
alias 3 'pushd +3; 0'
unset histchars
--------------------------
Part 2 provides a simple clock in the DM message window (again).
I don't use it but some people here like it.
Of course the stack display from part 1 would be overwritten
when the clock ticks but such is life. (The same goes for system
error messages!)
Part 2 source (trivially simple):
#!/bin/csh
while (2>1) # works for me :=)
xdmc msg \'`/com/date`\'
sleep 60
end
I hope these are of some use to someone somewhere.
--
Tim. ..!munnari!tim@attila.esa.oz