Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: "invalid arguments" in cpio completion
- X-seq: zsh-workers 39842
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: "invalid arguments" in cpio completion
- Date: Sat, 5 Nov 2016 14:52:04 -0700
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:date:in-reply-to:comments:references:to:subject :mime-version; bh=TG1/ApZSt72k0CQUyhJtva0ABh1ZMKY96XuqHKZRwmo=; b=VS3rWkC8/Q9DtvVa/E6fNbo0Wb7yPFWrkZYEKGWIjMX+sY1bB4oxvI4za5/yXPL5Gz NItHuopK9tUFXFrV1yhYPL5QCduOLGaGQCit80GmqusROL+whmdaZqhIfxrG3E2YrNyI Gb3sboUC5zsWD/jaDYs5k2dJGWP9Pil26ah8uUF/hb1wZySzbwgxvWdXPTti+FzNBlQS 5/PttMqqm5SZ7iBB5CgpKyMHaVkYZ7AtbV9xVogro9r1ulyrO91IUP9smGhkA4lO61Cr ZOzl7yc3uy7EIqiLmGPOYZvjvfmpLecrS0VTI8mDKZRq6Vhv2s+/U9M2AKqTGTOkU7FS ClgA==
- In-reply-to: <20161105203946.GB11681@fujitsu.shahaf.local2>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <20161103203256.GA13691@lorien.comfychair.org> <20161105203946.GB11681@fujitsu.shahaf.local2>
On Nov 5, 8:39pm, Daniel Shahaf wrote:
}
} Danek Duvall wrote on Thu, Nov 03, 2016 at 13:32:56 -0700:
} >
} > $ local args
} > $ args+=(a b c)
} > $ print -l -- "$args[@]"
} >
} > a
} > b
} > c
} >
}
} This behaviour is the same in HEAD.
That's not new behavior; using array-append on a scalar converts the
scalar into a 1-element array before appending to it.
The question is whether an empty scalar should be converted into a
1-element array or an empty array. This goes back to the fact that
in zsh without posixbuiltins, a declared variable is implicitly set,
and therefore its value is the empty string.
BTW, in the current HEAD zsh *with* posixbuiltins, attempting to
assign an array to an exported scalar will result in an error message
*but also* causes the scalar to become set (to empty). I'm not sure
what if anything posix compatibility would say about this.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author