Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Possible hpux bug



This problem only appears in hpux 9.01. It doesn't happen on linux,
solaris, or OSF1. I'm running 3.0pre6 on all those machines.

If I enter at the prompt:

source file

everything's happy. If, however, I do:

func()
{
  source file
}
func

Then I get a bunch of blank lines on the screen as the file gets
sourced. The number of blank lines seems to be roughly the number of zsh
commands in the file, not the number of lines in the file. To partially
rule out silliness on my part, this also happens when I remove all my zsh
startup files and log in, so zsh is only running on its internal
defaults. Is this a (known) bug, or am I just missing something?

For the curious, here's where this arose:

In an effort to polish off the portability of my dotfiles (since they have
to work on 4 different architectures and 6 differene OS's now), I wrote this
following function:

source_files() {
        basefile=$HOME/init/$1/$2
        if [ -f $basefile ]
        then
                source $basefile
        fi
        if [ -f $basefile.$ARCH ]
        then
                source $basefile.$ARCH
        fi 
        if [ -f $basefile.$SYSTEM ]
        then
                source $basefile.$SYSTEM
        fi 
        if [ -f $basefile.$ARCH.$SYSTEM ]
        then
                source $basefile.$ARCH.$SYSTEM
        fi
}

I keep my bourne family shell files in ~/init/bourne, and I keep the files in
my home directory machine independent, and then I stick a "source_files bourne
env" say into my .zprofile and it goes and finds all the ~/init/bourne/env.*
files that apply to the current machine and sources them.

bradym@xxxxxxxxxxxxxx



Messages sorted by: Reverse Date, Date, Thread, Author