[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference smurf::buildhelp

Title:USG buildhelp questions/answers
Moderator:SMURF::FILTER
Created:Mon Apr 26 1993
Last Modified:Mon Jan 20 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:2763
Total number of notes:5802

1727.0. "Re: My path while in workon and how can I tell I m in a sandbox?" by AOSG::FILTER (Automatic Posting Software - mail to flume::puck) Fri Aug 18 1995 14:43

Date Of Receipt: 	18-AUG-1995 12:53:47.88
From: 	SMURF::FLUME::"[email protected]" "18-Aug-1995 1252"
To: 	[email protected]
CC: 	[email protected]
Subj: 	Re: My path while in 'workon' and how can I tell I'm in a sandbox?

Jeff,

I have the following in my .cshrc file to 1. set my prompt differently for 
when I am in a sandbox and 2. set my path so that I always have all the 
script/tools I am supposed to have:

if ($?WORKON) then
    set path=(`/usr/sde/toolsbin.sh` $path)
    alias tree "sbinfo SRCDIR | cut -d/ -f7"
    if ($?prompt) then
        set prompt = "`hostname | sed 's/\..*//'`:`sbinfo sandbox_base | sed 
's/^.*\///'`> "
    endif
    echo "Backing tree is: `sbinfo SRCDIR | cut -d/ -f7`"
else
    set path=(. $HOME/bin /usr/ucb /bin /sbin /usr/doctools /usr/bin 
/usr/sbin /usr/lib/docsrc/bin/`/bin/machine` /usr/local /usr/new 
/usr/bin/X11 /usr/bin/mh /usr/hosts /doclib/mmp /usr/adept/bin 
/usr/adept/bin/decmips)
    if ($?prompt) then
        set prompt = "`hostname | sed 's/\..*//'`> "
    endif
endif

I don't know what the "ODE experts" think of this method, but it works for 
me.  The tree alias tells me what backing tree my sandbox is backed to.  If 
you decide to use this method, be sure to remove "set prompt" and "set path" 
from elsewhere in your .cshrc file and your .login.

				Hope it helps,

					Joyce

------- Forwarded Message

Return-Path: [email protected] 
Delivery-Date: Fri, 18 Aug 95 12:17:07 -0400
Return-Path: [email protected]
Received: from isaiah.zk3.dec.com by flume.zk3.dec.com; 
(5.65v3.2/1.1.8.2/16Jan95-0946AM)
	id AA25412; Fri, 18 Aug 1995 12:17:05 -0400
Received: by isaiah.zk3.dec.com; id AA20817; Fri, 18 Aug 1995 12:17:01 -0400
Date: Fri, 18 Aug 1995 12:17:01 -0400
From: Jeff Sullivan <[email protected]>
Message-Id: <[email protected]>
To: [email protected]
Subject: My path while in 'workon' and how can I tell I'm in a sandbox?


I have two questions...

1) My path is not the same while I am in a sandbox as opposed to outside.
   Therefore, I lose access to some of my private tools/scripts.
   I set my path in my ~/.login, as opposed to ~/.cshrc, so this may be
   related. Is there a workaround for this problem?


2) How can I tell that I'm in a 'workon' c-shell? I can generally tell due
   to the different path (see #1), but there must be a simpler way. I am
   constantly in fear of exiting out of a real shell (bye bye DECterm!)
   when I intend to exit a 'workon' c-shell.


Thanks,
- -Jeff

------- End of Forwarded Message


T.RTitleUserPersonal
Name
DateLines