zsh-users
 help / color / mirror / code / Atom feed
From: Vincent Lefevre <vincent@vinc17.org>
To: zsh-users@sunsite.dk
Subject: Re: I get tcsh at login; want zsh
Date: Mon, 17 Jul 2006 03:58:32 +0200	[thread overview]
Message-ID: <20060717015832.GQ26495@prunille.vinc17.org> (raw)
In-Reply-To: <237967ef0607161709t21c61aafr2dfbf6f447d8ce5a@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 855 bytes --]

On 2006-07-17 02:09:51 +0200, Mikael Magnusson wrote:
> On 7/17/06, Russell Hoover <rj@panix.com> wrote:
[...]
> >What do I need to do to be able to log directly into and directly out
> >of zsh?
> 
> Check what startup files are used by tcsh and put 'exec zsh' in it.

Some care must be taken. At the end of your .cshrc:

if ($?prompt && ! $?TCSH) then
  if ("$prompt" != "" && -X zsh) then
    setenv SHELL `which \zsh`
    if ($?loginsh) set SHELL = "$SHELL -l"
    exec shexec $SHELL
  endif
endif

where shexec is the attached Perl script. The tcsh exec bug has been
fixed in recent versions of tcsh; so, you may not necessarily need
shexec.

-- 
Vincent Lefèvre <vincent@vinc17.org> - Web: <http://www.vinc17.org/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/>
Work: CR INRIA - computer arithmetic / SPACES project at LORIA

[-- Attachment #2: shexec --]
[-- Type: text/plain, Size: 415 bytes --]

#!/usr/bin/env perl

# Workaround for the tcsh exec bug. Example:
#   tcsh> exec shexec zsh

use strict;

eval {
  require POSIX;
  foreach (3..63)
    { POSIX::close $_ if -t $_ }
  1;
} or warn <<"EOF";
Perl POSIX module not found! The non-standard file descriptors attached
to a tty (as those let open by this buggy tcsh) could not be closed.
EOF

exec @ARGV;

# $Id: shexec 11281 2006-02-27 13:24:27Z lefevre $

  reply	other threads:[~2006-07-17  1:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-16 23:28 Russell Hoover
2006-07-17  0:09 ` Mikael Magnusson
2006-07-17  1:58   ` Vincent Lefevre [this message]
2006-07-17  3:13   ` Christopher Browne
2006-07-17  7:08 ` Thorsten Kampe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060717015832.GQ26495@prunille.vinc17.org \
    --to=vincent@vinc17.org \
    --cc=zsh-users@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).