Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Bug with unset variables
- X-seq: zsh-workers 47531
- From: Felipe Contreras <felipe.contreras@xxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Bug with unset variables
- Date: Wed, 11 Nov 2020 09:57:19 -0600
- Archived-at: <https://zsh.org/workers/47531>
- Archived-at: <http://www.zsh.org/sympa/arcsearch_id/zsh-workers/2020-11/CAMP44s2x20VKt0Kp3OuUEDVhE%2B7EL5yVOpCfkKnKr7opRu1v4A%40mail.gmail.com>
- Authentication-results: zsh.org; iprev=pass (mail-wm1-f54.google.com) smtp.remote-ip=209.85.128.54; dkim=pass header.d=gmail.com header.s=20161025 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=7XBOG/hQmnje1bvkj3zQd6y4dzoV7OFkrf9FaipE538=; b=hwE7OYNc4rRM77zS/F/M/YxFLRc+jyFjq8UgbFthTund0MSGyCqSAXm/miLBppwkaD B7fwBIfIrE53hNmphQWnAyWYc8a+KbFGCYnXh9P6D+aFgKcs4jokuxLHYWAfIEEqCwqb wgKJlQUBkfxJfz9rT9zyRwv67qp47bDS+qtIfm0ZmBXa3naUe8yBnpEYB58yQ+CAezNq 2y4tm09mGdSD9qeXCBPOaqZQfM8P86TW2ZpM4oXYNfWxHqu7tLAz1jUW6z5kGtcdJk2t hvb4XjgbMLPgpdzabb+z2JCpua8J06FaNSzBw/33v4wprA5S7t3fGNCoYvyeiEBbRItL 8+qg==
- List-archive: <http://www.zsh.org/sympa/arc/zsh-workers>
- List-help: <mailto:sympa@zsh.org?subject=help>
- List-id: <zsh-workers.zsh.org>
- List-owner: <mailto:zsh-workers-request@zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-subscribe: <mailto:sympa@zsh.org?subject=subscribe%20zsh-workers>
- List-unsubscribe: <mailto:sympa@zsh.org?subject=unsubscribe%20zsh-workers>
- Sender: zsh-workers-request@xxxxxxx
Hello,
It's obvious what this code should do:
foo () {
typeset var
echo "var: '${var-other}'"
}
However, zsh throws an empty string.
I tried different emulations, like ksh, and the same thing happens,
even though in ksh the right output (other) is shown.
I also tried with the other unnamable shell, and the correct output is shown.
Only zsh does something different.
My version is zsh 5.8.
Cheers.
--
Felipe Contreras
Messages sorted by:
Reverse Date,
Date,
Thread,
Author