From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25736 invoked by alias); 29 Jan 2013 06:28:21 -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: 17616 Received: (qmail 19392 invoked from network); 29 Jan 2013 06:28: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=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.2 Received-SPF: none (ns1.primenet.com.au: domain at macports.org does not designate permitted sender hosts) X-AuditID: 12074414-b7f9b6d0000008b3-bb-51076a577d5e Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 6.2 \(1499\)) Subject: Re: PATH reordered when running zsh inside screen on Mac OS X Mountain Lion and MacPorts From: =?windows-1252?Q?Lawrence_Vel=E1zquez?= In-Reply-To: Date: Tue, 29 Jan 2013 01:21:09 -0500 Cc: Zsh Users Content-Transfer-Encoding: quoted-printable Message-Id: References: To: Nikolai Weibull X-Mailer: Apple Mail (2.1499) X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprKKsWRmVeSWpSXmKPExsUixO6iqBuexR5o8G6OlcWLvgeMFjtOrmR0 YPK43tHN4rHq4AemAKYobpukxJKy4Mz0PH27BO6MT+8mMBZ8561YcfI/ewPjWu4uRk4OCQET id/Xt7JA2GISF+6tZ+ti5OIQErjMKLHm8wV2COcgk8Slk/vYQKqYBfQkdlz/xQpi8wLZhzu3 g9nCAokSl/rXAE3i4GATcJZ4M08UJMwpEChxa+kXsFYWAVWJ7zOWM0GMUZTYPfkrI4StLbFs 4WtmiJH2ElOW7mOC2HuLUWLSqUtg80UElCQaj9+GulRWYsXUXqYJjAKzkJw0C8lJs5DMXcDI vIpRLjGnNFc3NzEzpzg1Wbc4OTEvL7VI10IvN7NELzWldBMjJFhFdjAeOSl3iFGAg1GJh7d9 AVugEGtiWXFl7iFGSQ4mJVHeW+nsgUJ8SfkplRmJxRnxRaU5qcWHGCU4mJVEeN+JA+V4UxIr q1KL8mFS0hwsSuK83xar+wkJpCeWpGanphakFsFkZTg4lCR43TOBGgWLUtNTK9Iyc0oQ0kwc nCDDuaREilPzUlKLEktLMuJBsRpfDIxWkBQP0F5pkHbe4oLEXKAoROspRl2O+6e7nzMKseTl 56VKifP6gxQJgBRllObBrYClpleM4kAfC/PGgVTxANMa3KRXQEuYgJZk9zKDLClJREhJNTBO LZT13MHxMCuVW3TnddEj+bah3YdWs9vuZ37Tdmbqxy1RR5TMv90xTvPtKmd7zu3+f0r1XYPt hVtEd/y+u7zxOJNyX2lhjKEt18Pr5WK/E28oHM/dcNQn0G1HFR9Xc4lPxLyqEvn+k16Cyb93 +UoXfA+tnXnces70I405ghdDu9eK2Ne3lCixFGckGmoxFxUnAgCK8NlDKAMAAA== On Jan 28, 2013, at 5:08 AM, Nikolai Weibull wrote: > I figured out what the problem was. /etc/zshenv on Mac OS X Mountain = Lion calls a utility called path_helper. The /usr/libexec/path_helper program is used by prior versions of OS X = also, albeit implemented differently. (At one point it was a shell = script.) Its purpose is to create a default ${PATH} and ${MANPATH} using = the contents of /etc/{paths,manpaths} and /etc/{paths,manpaths}.d. For more details, see the path_helper(8) man page[1]. For way too many = details, see the path_helper source code[2]. [1] = https://developer.apple.com/library/mac/#documentation/Darwin/Reference/Ma= nPages/man8/path_helper.8.html. [2] = http://www.opensource.apple.com/source/shell_cmds/shell_cmds-170/path_help= er/path_helper.c > Oh, and why /etc/zshenv in Mac OS X Mountain Lion modifies path in = this way is way beyond me. In my world, that=92d go into /etc/zprofile. I agree that /etc/zprofile would be a better place to set ${PATH}, but = you would still run into the issue because terminal multiplexers usually = run login shells. I previously encountered it under tmux. The real problem is that /usr/libexec/path_helper alters ${PATH} even if = ${PATH} already contains the entries it wants to add. In this case, it = moves the entries to the beginning of ${PATH} instead of just leaving it = as is. > as far as I can tell, this didn=92t occur before I upgraded to 5.0.2 = (from zsh-devel? (which was at 5.0.0?), can=92t remember). The old zsh-devel port did use --enable-etcdir in its configure phase. = For the reason given by Phil, I chose not to carry this over to the zsh = port when I assumed maintenance of both and obsoleted zsh-devel. vq=