HOMEPATH

From ICE Enterprises
Jump to navigation Jump to search

sets user home directory

<path>  Full directory path specification
<opt>	Option tree name (path is then area)

This routine is used to set the home path.  This is where Midas looks for
user macros.  For example:

	homepath dua1:[midas.user.projectA]	<-- VMS
	homepath /home/midas/user/projectA	<-- Unix

Typing HOMEPATH with no argument displays the current home path.

If <path> = RESTORE, path will be set to the previous path.
If <path> = TEST, path will be set to the test area of the sys option tree.

If not the two above special cases, the homepath is set to <path>.
Under VMS, if <path> does not end in a right square bracket ( ] ) or a
colon (:) it appends a colon (:).  Under Unix, if <path> does not end in a
slash ( / ) or tilde ( ~ ) it appends  a slash ( / ) .

If path is not specified then the current setting of the homepath will be
displayed.


Keeping the HOMEPATH as the current working directory (CWD)
===========================================================
  Since NeXtMidas 3.1.0, it is possible to set the HOMEPATH to always be the
  current work directory (CWD), even if the CWD changes after the HOMEPATH
  command. For example, if the user has a CWD of "/tmp", then...

    nM> homepath/cwd

  ...will set the HOMEPATH to "/tmp". If the user then changes directories, e.g
  via the NMD command or CD command, the HOMEPATH changes also. For example...

    nM> nmd test sys

  ... then changes the HOMEPATH to $NMROOT/sys/test. To revert back to standard
  HOMEPATH functionality (i.e. no longer keep in sync with the CWD), simply use
  the HOMEPATH command without the /CWD switch (or with /CWD=FALSE).


Switches:
  /CWD     - Sets HOMEPATH to CWD and automatically follow CWD (Since 3.1.0)
  /NOWARN  - Do not print warning message when an invalid HomePath is specified
  /RESTORE - restore current to OLDHOMEPATH (same as <path>=RESTORE)
  /STORE   - store current to OLDHOMEPATH before executing arguments. [DEF=TRUE]
  /VERBOSE - Display the current home path. [DEF=TRUE]