Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
passing data to .zshrc
- X-seq: zsh-users 23091
- From: Matt Zagrabelny <mzagrabe@xxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: passing data to .zshrc
- Date: Wed, 17 Jan 2018 16:43:20 -0600
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=d.umn.edu; s=google; h=mime-version:from:date:message-id:subject:to; bh=hgnXwaOTGRxKR6ICnsgQdJUocrlt4qOm91i4nHyh/5Y=; b=O/uALZpThTazp5e4xjn8e1wObuXYtOYJ6WRfX81E0E2L9jvOnxeFhu9I9uTTfoTbiX PPK2xfLdAoZl1r949cP/NIC13DWC558FWpv9dRdsB86hALHLalHZsspfEeeU0ZgT4nwp n9zXB0zXc7L4zDOdWSJgTIao8rnjKGRN+t41V+csHa8s2r9U092/e3T1zKJF3pmioRwq zE6RPZasFoKHa72nlUylTwJivsRU+HWPVCvbS/rwzOXTRSakX3Y62/x3NajSTwEKczHC JhpmLGVZ+VYXaqoXY1g2yFloHhnP/nocNANJYpRmajgTGMEQstaV2OpKpgB+me3moJ3g RTew==
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- List-unsubscribe: <mailto:zsh-users-unsubscribe@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author