[Pkg-zsh-devel] Bug#691886: zsh: ". file" in .zshenv gets arguments from the original script

Vincent Lefevre vincent at vinc17.net
Tue Oct 30 17:59:31 UTC 2012


Package: zsh
Version: 4.3.17-1
Severity: normal

Consider a script "script1" containing only the following line:

#!/usr/bin/env zsh

and a script "script2" containing:

echo Args: "$@"

The .zshenv file contains:

. ~/script2
. ~/script2 blah

I get the following:

xvii% ./script1 ab cd ef
Args: ab cd ef
Args: blah

The first line shouldn't show any argument because an empty list of
positional parameters was provided in the ". ~/script2" line!

-- System Information:
Debian Release: wheezy/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 3.5-trunk-amd64 (SMP w/2 CPU cores)
Locale: LANG=POSIX, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages zsh depends on:
ii  libc6      2.13-36
ii  libcap2    1:2.22-1.2
ii  libtinfo5  5.9-10

Versions of packages zsh recommends:
ii  libc6         2.13-36
ii  libncursesw5  5.9-10
ii  libpcre3      1:8.31-1

Versions of packages zsh suggests:
ii  zsh-doc  4.3.17-1

-- no debconf information



More information about the Pkg-zsh-devel mailing list