From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1MU0Da-0000Uy-Og for garchives@archives.gentoo.org; Thu, 23 Jul 2009 15:28:26 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 7AD3AE01CD; Thu, 23 Jul 2009 15:28:25 +0000 (UTC) Received: from mail.goodpoint.de (tori.goodpoint.de [85.10.203.41]) by pigeon.gentoo.org (Postfix) with ESMTP id 46F52E0169; Thu, 23 Jul 2009 15:28:25 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: rbu) by mail.goodpoint.de (Postfix) with ESMTP id E521C14400D; Thu, 23 Jul 2009 17:28:23 +0200 (CEST) From: Robert Buchholz To: gentoo-soc@lists.gentoo.org Subject: [gentoo-dev] Re: [gentoo-soc] Re: Progress on Universal Select Tool Date: Thu, 23 Jul 2009 17:28:21 +0200 User-Agent: KMail/1.9.10 Cc: =?iso-8859-1?q?S=E9rgio_Almeida?= , Gentoo Dev References: <1245163715.14589.515.camel@thedude> <8b4c83ad0907222232o6499fcbcjce1d8a063d93d5c1@mail.gmail.com> <1248356100.8713.11.camel@thedude> In-Reply-To: <1248356100.8713.11.camel@thedude> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1762714.6u132vjpUi"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200907231728.23329.rbu@gentoo.org> X-Archives-Salt: 108d3839-4d94-4fe9-960d-41377cade7a3 X-Archives-Hash: 9f8832dde2885da394cb81f0cdefb2e6 --nextPart1762714.6u132vjpUi Content-Type: text/plain; charset="iso-8859-2" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Thursday 23 July 2009, S=E9rgio Almeida wrote: > You changedir, you call uprofile, and > voila, new profile. You login again, default profile. Most shells have the ability to execute a command when a new prompt is=20 generated. Users do not need to call uprofile themselves, they could=20 set up their ~/.*shrc to do this. =46or zsh (and tcsh), you can define a function: chpwd Executed whenever the current working directory is changed. precmd Executed before each prompt. Note that precommand=20 functions are not re-executed simply because the command line is redrawn, as happens, for example, when a notification about an exiting job is displayed. =46or bash, you can set a variable: PROMPT_COMMAND If set, the value is executed as a command prior to issuing each primary prompt. You could utilize this to call uprofile, have it output environment=20 variables and set them in the shell environment. A portable (bug ugly,=20 code wise) way would be to do this as part of the PS1 variable. Robert --nextPart1762714.6u132vjpUi Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.11 (GNU/Linux) iQIcBAABCAAGBQJKaIGXAAoJECaaHo/OfoM5VywQAMaJHsuqTZZJyOw5WgkeEEDR O/WqpIj1pwkKCRSOh0f1x8cZLCfLFawdbue3CzQ/oiED+Gzr3dgUQLUr2mAeijaG Q4XEbo/rDTDPTj/3pZDZE28cCW/UbtjJrlkREaAUHqHrqPvKmPx//sJAWSztyi+I mM1hA0Iqjkq+uIVTTVGkoMuBwGTH4yS1hIm6MYZagMXuXoNFDH471uaat91IO0uY 5+5ClUrYDSslzcKzUT4zia4I2z8Lo3AZmgvaAVYYPfwkIAs3jrrdGo7kidfwvSit pLPgVCaNd1bvP1z/UZcoNNX7tJV81Y78WanPkwnQ2diNABGc0to8K3hT+r5D7Snd TKsNi07pDuv44iheFk0AC/pF9xtus2ev9YjxKvmLgZaqgCnbD3MLgMATLGq3EXEA 4ZEmfXES5yhxuSaZigzheOAivITbrXNrAC/IKRdhhVg0GrAbCbqBXSXiReu6YSpq lIxBw28n8in3WsDMCVZTRFzE61OeK/ZiKzh1KucjlfUeLgS2SdbPaiATt2o1WoYR cTun0DbYji1lFNIMmhdmPO5zUQ/UAbbL20p0sWryw77MkxyemVhKFGBkAIj1UCqN R/R1LCKTlOUDD2YHeKu36e3Odcn/2T4pnCpergZSOSBmxZodFzz8X6KTVlGJdO00 yqgNH4Ft4ZRIEcqQreqc =CqQQ -----END PGP SIGNATURE----- --nextPart1762714.6u132vjpUi--