From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3505 invoked by alias); 9 Dec 2011 08:15:32 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 16612 Received: (qmail 6403 invoked from network); 9 Dec 2011 08:15:19 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham version=3.3.2 Received-SPF: none (ns1.primenet.com.au: domain at picard.franken.de does not designate permitted sender hosts) Date: Fri, 9 Dec 2011 09:04:35 +0100 From: Thomas =?iso-8859-1?Q?K=F6hler?= To: Daniel Lin Cc: Bart Schaefer , Zsh Users Subject: Re: How to display zsh is 32/64 bit? Message-ID: <20111209080435.GA29537@picard.franken.de> Mail-Followup-To: Daniel Lin , Bart Schaefer , Zsh Users References: Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="VbJkn9YxBvnuCH5J" Content-Disposition: inline In-Reply-To: X-Operating-System: Linux X-Editor: VIM - Vi IMproved 7.2 http://www.vim.org/ X-IRC: tirc; Nick: tkoehler X-URL: http://gott-gehabt.de/800_wer_wir_sind/thomas/Homepage/index.html User-Agent: Mutt/1.5.4i --VbJkn9YxBvnuCH5J Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Daniel, Daniel Lin wrote: > To do cross compile of 32/64 bit program on one machine.(which installed > 64-bit zsh) > I use ArchLinux x86_64 as host machine. > And a arch32 chroot environment for 32-bit compiling(which installed 32-b= it > zsh). >=20 > One problem is the PS1 of zsh. > It will display the same on both environment. > I'm wonder could I show different prompt inside the chroot environemnt? >=20 > If zsh's prompt variable can deal this? On Linux, you can simply do something like this: PS1=3D$(file -L /proc/$$/exe | sed -e 's/.*ELF //' -e 's/-bit.*/ /') On my 64 bit (debian derivative) system, that yields a PS1 of "64 ", while in the 32 bit (debian) chroot, that yields a PS1 of "32 ". Ciao, Thomas --=20 Thomas K=F6hler Email: jean-luc@picard.franken.de <>< WWW: http://gott-gehabt.de IRC: tkoehler Freenode: thkoehler PGP public key available from Homepage! --VbJkn9YxBvnuCH5J Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (GNU/Linux) iD8DBQFO4cETTEYXWMJlHuYRAlEIAJ4tsF/kY8Ldtt25rQFDOuOGNAf44ACffbMf WphBIFarW6FTf9X+TiV5Txk= =hQ4Q -----END PGP SIGNATURE----- --VbJkn9YxBvnuCH5J--