zsh-workers
 help / color / mirror / code / Atom feed
From: "joão marcos pereira bezerra" <marcospb19@hotmail.com>
To: "zsh-workers@zsh.org" <zsh-workers@zsh.org>
Subject: Issue with string slices
Date: Mon, 17 Jun 2019 08:36:58 +0000	[thread overview]
Message-ID: <RO1P152MB0841421B113C0DFAFF91832AD4EB0@RO1P152MB0841.LAMP152.PROD.OUTLOOK.COM> (raw)

[-- Attachment #1: Type: text/plain, Size: 363 bytes --]

Zsh is not printing the character "-"

Example 1:
arg="--help"
echo ${arg[1]}
echo ${arg[2]}
echo ${arg[3]}

Expected:
-
-
h

Got:
(new line empty)
(new line empty)
h


Example 2:
arg="--help"
echo ${arg:0:1}
echo ${arg:0:2}
echo ${arg:1:1}
echo ${arg:1:2}

Expected:
-
-
-
h

Got:
(new line empty)
--
(new line empty)
-h



             reply	other threads:[~2019-06-17  8:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20190617083759epcas1p11383850c11184f54e3a0b822c9ea12e6@epcas1p1.samsung.com>
2019-06-17  8:36 ` joão marcos pereira bezerra [this message]
2019-06-17  8:51   ` Peter Stephenson
2019-06-17  9:05     ` Roman Perepelitsa
2019-06-17 16:15       ` joão marcos pereira bezerra
2019-06-18 18:12       ` Stephane Chazelas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=RO1P152MB0841421B113C0DFAFF91832AD4EB0@RO1P152MB0841.LAMP152.PROD.OUTLOOK.COM \
    --to=marcospb19@hotmail.com \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).