[comp.sys.handhelds] changing directories

peraino@gmuvax2.gmu.edu (Bob Peraino) (04/22/91)

>From: jthornto@ee.ubc.ca (Johan Thornton)
 
>->2) If you just want to jumb to the directory BINP just key in:
>->   { HOME BINP } EVAL
>->
>->Morgan Lindqvist d89-mlt@sm.luth.se 
> 
>This is not a bad idea.  Not much overhead at all.  But note that you
>don't have to explicitly say HOME when switching to the BINP directory.
>Since that subdirectory is in HOME, it's always in the path.
> 
>Likewise for 2), above -- to go to the BINP subdir just execute BINP. 
>--
>Johan Thornton

     It is ALWAYS safer to to change to a directory by starting at the root,
even if the directory you want to go to is in the path. Otherwise, you
may fall prey to a subtle problem down the road. Scenario: you want to do some
work on your terminal emulator, so you make a directory called TERM. You
go into TERM and decide to call the main program module TERM. You create a
temporary subdir in TERM and go into that. Now you want to go back up to
term. Type TERM and what happens? Generally, naming vars similar to dirs in
the path will give you problems unless you always eval paths from the root.

peraino@gmuvax