Thread View: gnu.bash.bug
1 messages
1 total messages
Started by Gregory Bond
Tue, 19 Sep 1989 00:08
Re: Bash-1.03 and exported PATH and history substitutions
Author: Gregory Bond
Date: Tue, 19 Sep 1989 00:08
Date: Tue, 19 Sep 1989 00:08
63 lines
3328 bytes
3328 bytes
>From: bfox%aurel.caltech.edu@murtoa.cs.mu.oz (Brian Fox)
>Subject: Bash-1.03 and exported PATH and history substitutions
>Date: Fri, 15 Sep 89 09:07:19 H
Date: Thu, 14 Sep 89 19:05:36 +1000
From: Gregory Bond <munnari!melba.bby.oz.au!gnb@uunet.uu.net>
1) If you have a path line like
PATH=:/bin:/usr/bin:~/bin:/usr/local/bin
then when it is exported, the ~ is not expanded. This confuses
subsequent invocations of /bin/sh or other programs that parse
paths, for example make. Csh does expand components of the path it
exports.
Csh expands words beginning with whitespace. It does not have to expand
the components of PATH, which are separated by colons. I could special
case the PATH variable, which I think is ugly beyond belief.
I agree, it's ugly. However, some method of expanding ~name in
PATH-like variables would be nice. I think a general-purpose
mechanism is required (for things like MANPATH etc), but I can't think
of any clean way to do this expansion using expr or test etc, nor can
I think of a method of constructing the PATH to expand at construction
time. But some special operator is also ugly. Perhaps a
string-concatenation operator:
PATH=:/bin:/usr/bin: + ~/bin + :rest:of:path
(In csh this happens because PATH is set using the csh space-separated
syntax.)
This one annoys me a lot: you can't add slashes with ^.^./^ as
Yes, you can. Please try again. Also, please specify the version of
Bash (or better yet, readline) which is giving you the problem.
Um, red faces time. I checked this before posting, but must have
checked on the 1.02 shell (where it definitly didn't work).
I do not expect to spend any substantial amount of time hacking on the
arcane and non-intuitive Csh !-style history interface. I have already
spent too much time as it is.
I have started looking at
these problems and may eventually produce a better history editor.
If you produce a better history editor, which is clean, and provides the
same interface as mine, I will be more than happy to make it a part of
the Readline library. Perhaps next time, you can spend the half hour
adding the features that you want instead of me!
Better in the sense of more like csh - for many years of habit die
hard. (The number of times I type <ESC> in bash and emacs to get file
completion... ). Given the :gs stuff, the next thing I miss is & in
the replacement string. I AM working on this, but it's a bit more
than 1/2 hour for someone who doesn't know the code. This whole
history mechanism is nasty twisted job, full of odd surprises and dark
corners. I can well understand the desire to leave it behind.
But, boy, I do love this shell.
Greg. Bash fanatic.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads