can't get path

can't get path

Post by Holger Bur » Thu, 11 Jul 1996 04:00:00


I'am writing a GUI based Commandpanel. To get this really
usable i must somehow manage to launch applications in such
a way that they start from the directory where my (main)xterm
points to. If i change dir the cmd Panel also should. Is there
a way to 'watch' an xterm/cmdtool/whatever i choose and see such
internals (on Solaris2.4) ???? Any help or ideas how it could
work are welcome !!!!

PS i scaned the man pages about /proc but found no (obvious)way
   to get the information.

thanks in advance



1. zsh's 'typeset -U path' wipes out path/PATH

I've found a bug (or at best a very perverse "feature") in zsh; it
can be illustrated by the following three short scripts:

# script_A
echo $#path
typeset -U path
echo $#path
# eof

# script_B
source script_A
# eof

# script_C
c_fxn () { source script_A }
# eof

Note that both the contents of script_B and the body of the function
c_fxn defined in script_C consist of the same one line, namely
"source script_A".  Now,

% source script_B
% source script_C

In words, when script_A is sourced within a script that is itself
being sourced, typeset -U path preserves the components of PATH
(or at least their number), but if script_A is sourced within the
body of a *function*, calling the function causes the expression
typeset -U path to *clear* the contents of PATH.

Please-please-please don't tell me this is a feature!  I'd lose
all faith in the designers of zsh if this turns out to be a feature!

More importantly, how does one get around this problem.  I've tried
saving the value of $path before calling 'typeset -U' on it, and
restoring it afterwards, but the results have been disastrous (I've
tried too many variants to describe them all).


NOTE: In my address everything before the first period is backwards;
and the last period, and everything after it, should be discarded.

2. Useful SCSI Query Program

3. Getting the full path name in an 'ls'

4. Using .htaccess to protect getting errors with mysql

5. getting 'find' to return absolute paths

6. Volume daemon - NFS question

7. methods to operate on instances of class ``Path'', was: path utility functions

8. Login notify?

9. Can't Alter My Path, Can't Find My Path

10. It's not bad canned meat...

11. Getting exe's path - getexecname() ?

12. getting a file's path