* passing data to .zshrc
@ 2018-01-17 22:43 Matt Zagrabelny
2018-01-17 22:54 ` Eric Cook
0 siblings, 1 reply; 3+ messages in thread
From: Matt Zagrabelny @ 2018-01-17 22:43 UTC (permalink / raw)
To: zsh-users
[-- Attachment #1: Type: text/plain, Size: 1196 bytes --]
Greetings,
I am not (yet) subscribed to the -users mailing list. Please CC me. Thanks!
I use a simple shell script wrapper to launch mate-terminal:
#/bin/sh
mate-terminal --geometry=156x42
My default shell is zsh - which gets successfully spawned in the
aforementioned terminal.
I'd like to make programatic decisions inside my .zshrc file based on a
variable in my wrapper script. Or I'd like to pass some sort of data to the
.zshrc script.
I could imagine something like:
#/bin/sh
mate-terminal --geometry=156x42 --command /bin/zsh --env FOO=bar
and then in my .zshrc do things for various values of $FOO.
I've googled and checked the man pages for passing environment variables
into zsh via a CLI option, but couldn't find anything.
The graphical nature of the mate-terminal makes it so I can't:
#/bin/sh
export FOO=bar
mate-terminal --geometry=156x42
Similarly the following does not work:
#/bin/sh
mate-terminal --geometry=156x42 --command FOO=bar /bin/zsh
I suppose I could do some convoluted exec'ing with the mate-terminal to
pass in an environment variable, but I'd rather find a (somewhat) elegant
solution.
Does anyone have any ideas or suggestions for me?
Thanks!
-m
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: passing data to .zshrc
2018-01-17 22:43 passing data to .zshrc Matt Zagrabelny
@ 2018-01-17 22:54 ` Eric Cook
2018-01-18 21:14 ` Matt Zagrabelny
0 siblings, 1 reply; 3+ messages in thread
From: Eric Cook @ 2018-01-17 22:54 UTC (permalink / raw)
To: zsh-users; +Cc: mzagrabe
mate-terminal --geometry=156x42 --command /usr/bin/env FOO=bar zsh
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: passing data to .zshrc
2018-01-17 22:54 ` Eric Cook
@ 2018-01-18 21:14 ` Matt Zagrabelny
0 siblings, 0 replies; 3+ messages in thread
From: Matt Zagrabelny @ 2018-01-18 21:14 UTC (permalink / raw)
To: Eric Cook; +Cc: zsh-users
[-- Attachment #1: Type: text/plain, Size: 168 bytes --]
Hey Eric,
On Wed, Jan 17, 2018 at 4:54 PM, Eric Cook <llua@gmx.com> wrote:
> mate-terminal --geometry=156x42 --command /usr/bin/env FOO=bar zsh
Thanks so much!
-m
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-01-18 21:15 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-17 22:43 passing data to .zshrc Matt Zagrabelny
2018-01-17 22:54 ` Eric Cook
2018-01-18 21:14 ` Matt Zagrabelny
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).