From: Stephane Chazelas <Stephane_Chazelas@yahoo.fr>
To: Zsh hackers list <zsh-workers@sunsite.dk>
Subject: FAQ and other shell syntax
Date: Wed, 12 Jan 2005 11:21:14 +0000 [thread overview]
Message-ID: <20050112112114.GB11326@sc> (raw)
read at
http://zsh.sunsite.dk/FAQ/zshfaq01.html#l8
[ x$ZSH_VERSION = x -a -f $HOME/bin/zsh ] && exec $HOME/bin/zsh -l
It should be noted that contrary to zsh, other shells need their
variables to be quotes (my home dir is "/home/Stephane Chazelas").
if [ -z "$ZSH_VERSION" ] \
&& [ -f "$HOME/bin/zsh" ] \
&& [ -x "$HOME/bin/zsh" ]; then
SHELL=$HOME/bin/zsh; export SHELL
exec "$SHELL" -l
fi
and SHELL may be updated so that further xterm/screen/vi...
start the new shell instead of the login shell.
[ -f $HOME/bin/zsh ] && {
echo "Type Y to run zsh: \c"
read line
[ "$line" = Y ] && exec $HOME/bin/zsh -l
}
Not every shell/echo support '\c'
Either use:
printf 'Type Y to run zsh: '
or
echo "Type Y to run zsh: " | tr -d '\12'
read line
if [ "x$line" = xY ]; then
SHELL=$HOME/bin/zsh; export SHELL
exec "$SHELL" -l
fi
regards,
Stéphane
next reply other threads:[~2005-01-12 11:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-01-12 11:21 Stephane Chazelas [this message]
2005-01-12 12:22 ` Alexandre Duret-Lutz
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=20050112112114.GB11326@sc \
--to=stephane_chazelas@yahoo.fr \
--cc=zsh-workers@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).