zsh-users
 help / color / mirror / code / Atom feed
From: Andrew Main <zefram@tao.co.uk>
To: quinn@envy.ugcs.caltech.edu (Quinn Dunkan)
Cc: zsh-users@math.gatech.edu
Subject: Re: ideas, questions, and bugs (?)
Date: Wed, 8 Oct 1997 10:34:19 +0100 (BST)	[thread overview]
Message-ID: <199710080934.KAA07190@taos.demon.co.uk> (raw)
In-Reply-To: <199710080711.AAA01989@tammananny.tiger> from "Quinn Dunkan" at Oct 8, 97 00:11:51 am

Quinn Dunkan wrote:
>                  I wound up changing the configure script (dlopen is in -ldl
>on my linux system), and altering zshxmods.h and bltinmods.list to get a
>modular binary.

What did configure --enable-dynamic get wrong?  It does look for libdl.

>When chaselinks is off, there is a problem that the shell's idea of .. is
>different from another program's idea.

An unavoidable problem with symlinks.  If you want consistency, turn
chaselinks on.

>                              What I would like is an option that makes it so
>that when chaselinks is off, zsh acts as if you really are in the fake zsh
>path, so it would 'expand' /old/path/symlink/../foo to /old/path/foo.

Can't be done.  There's no way to distinguish a pathname from any other
argument.  In any case, a program might generate .. segments itself.

>A $LASTPID or something parameter, which is the pid of the last command run.
>Yes, I know about $!, but that only works if the process is &ed and not at all
>if it forks like a daemon (or maybe daemons pitchfork() ?).

If the program daemonises, a $LASTPID wouldn't help.  If you want a
PID, you can just background the command -- use wait is you then want
synchronicity.

>As much as I try, I can't figure out a good way to have zsh execute some
>command at startup and stay in interactive mode.

Funnily enough, `interactive' implies interaction with the user.  If you
want interaction in a shell script, use vared.

>instead of just beeping when the user attempts to scroll the history past the
>current line, zsh should just predict the user's next command, so you could
>have a forward 'history' as well.

I'd already considered doing this; history references like "!+1" ought
to work.  Of course, to get commands from future sessions you'll need
a history file saved on a trfs (temporally reversed filesystem -- the
media uses positrons instead of electrons).

>                                   Of course, you could also use this for
>command line completion: just hit <tab><enter> to complete your next command
>and execute it,

Ah, but with the new widget interface it's a trivial matter of programming
for each user to write the interface to their own brain scanner.

>To add some more confusion to the rc file thread, I don't quite understand the
>reasons for zprofile/zlogin.

.zprofile is run first thing, in the manner of .profile.  .zlogin is
a csh-like feature -- it is sourced after the normal shell startup,
and so has the user's full normal environment available.

>           Also, is it better to stick vars in zlogin and export them so future
>shells inherit them, or put things like PATH, MANPATH, HOSTNAME, etc. in
>zshenv?

Put them in zshenv, and export if appropriate.

>                                   Is it better to let progs inherit their
>enviroments rather than rescan a large /etc/zshenv every time?

You shouldn't have anything in /etc/zshenv.  Most zsh scripts should
also start "#!.../zsh -f" to avoid scanning any initialisation files.

>In zsh 3.0.0, PATH always reflecs path, and vice-versa.  In zsh 3.1.2, PATH
>reflects path only if PATH is set.

This is a feature.  Don't unset PATH if you want it to be available.

>Oh, and does anyone know a way to reprint the prompt?

Can't be done.  Yet.  I want to make it possible eventually, so that we
can have a ticking clock in the prompt.

>                                                        I tested this with
>zle clear-screen instead of the (nonexistent) redraw-line,

You want redisplay.

>                                                           and the prompt
>came back mangled (spaces and high chars),

FITNR (I think), but it won't change the prompt.

Actually, that's rather annoying.  I noticed that zsh had a problem with
this when I first used it, back in 2.6-beta4 or so.  I fixed it in the
2.6 series, but due to this causing some other problem it was removed
for 3.0.  The new fix in 3.1 does things properly, but that's too late
for the thousands of people using 3.0.

-zefram


  parent reply	other threads:[~1997-10-08  9:54 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-10-08  7:11 Quinn Dunkan
1997-10-08  8:19 ` Peter Stephenson
1997-10-08  9:11   ` Andrew Main
1997-10-08  9:34 ` Andrew Main [this message]
1997-10-08 20:11   ` TGAPE!
1997-10-09 17:57     ` Tim Writer
1997-10-11  0:08       ` TGAPE!

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=199710080934.KAA07190@taos.demon.co.uk \
    --to=zefram@tao.co.uk \
    --cc=quinn@envy.ugcs.caltech.edu \
    --cc=zsh-users@math.gatech.edu \
    /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).