Subject: FVWM: Appending sth. to an empty(?) env. var.?

From: "Felix E. Klee" <[email-masked]>
Date: Sat, 21 Feb 2004 19:11:09 +0100

Hi,

under FVWM, how can I get the same behavior as the following BASH
command:
    export SOME_PATH=$SOME_PATH:/usr/lib
?

The problem is that I don't know whether $[SOME_PATH] is already set or
not. When it is set, then 
    setenv SOME_PATH $[SOME_PATH]:/usr/lib
sets the value of $[SOME_PATH] to "$[SOME_PATH]:/usr/lib". When it is
not set, then the above command works as desired.

Felix

PS: I know that I still have to finish up those logos. I hope that I'll
find the time next week (currently, I still have a lot of other
obligations to fullfill).

PPS: To contact me off list don't reply but send mail to "felix.klee" at
the domain "inka.de". Otherwise your email to me might get automatically
deleted!
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].

---

From: Mikhael Goikhman <[email-masked]>
Date: Sat, 21 Feb 2004 22:22:33 +0000

> not set, then the above command works as desired.

You may do:

  PipeRead 'echo SetEnv SOME_PATH $SOME_PATH:/usr/lib'

Regards,
Mikhael.

---

From: "Felix E. Klee" <[email-masked]>
Date: Sun, 22 Feb 2004 01:08:53 +0100

>   PipeRead 'echo SetEnv SOME_PATH $SOME_PATH:/usr/lib'

Thanks for this nice and simple solution. I wrapped it into a function
(took some time, though, until I had the quoting correct):

    DestroyFunc AppendToEnv
    AddToFunc AppendToEnv
    + I PipeRead 'echo SetEnv $0 $$''$0:$1'

Felix

PS: To contact me off list don't reply but send mail to "felix.klee" at