Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Additional space at end of assignment in preexec's $2 and $3
- X-seq: zsh-workers 33944
- From: Daniel Hahler <dhahler@xxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Additional space at end of assignment in preexec's $2 and $3
- Date: Tue, 09 Dec 2014 23:51:27 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:message-id:date:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; bh=y1IXcfNP5Ynaa43iNwOjK/XXPjgvhy7L4bITyJNhZDA=; b=BklkzwbAXgsdD6B+NUUtuqH7nycRYhpG+j9RFpqsORBrVNsh0Pbm2dRq8s5LU5LYOZ 2pMRiWjV+RMQ6laj7dYH3sVwk0X42StARBry/p4TIWGVGJLOfcTlf9LjW782L4Cfw/JZ zN4slf1VyvdPgOfEIGklMlW41FPXei5U0S5vce1mZtbM89WCImC+vgnMAf2vWlNuBLdO OwLIDp0RX5QXIUoS/kvpsTkffwhmHdAQfz2FMW+QIcrCvkLRBAsJ+LXxKIZlo6lpWdcs AS/k9Ce5SL+vmxyQlNgkWQRr/SFj0Pd6ButM7ehWVlVtnnLBwyCWvuAGs8jpMJVgc3qr DXhQ==
- 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
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
An assignment appears to have an additional " " at the end of $2 (and $3) in preexec:
% preexec() { echo "== preexec =="; set -x; test $1 = $2; echo $3; set +x }
% foo
=== preexec ==
+preexec:0> test 'foo=' '=' 'foo= '
+preexec:0> echo 'foo= '
foo=
+preexec:0> set +x
Please note that 1="foo=", but 2 and 3 are "foo= ".
Regards,
Daniel.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iD8DBQFUh3zvfAK/hT/mPgARAsqWAJ9bPMjZsKP+WLByg5hqTX9Zfq33FwCfUZR7
g7K0vki9ODKbLIm2prDVwVs=
=+Xau
-----END PGP SIGNATURE-----
Messages sorted by:
Reverse Date,
Date,
Thread,
Author