Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Issue with string slices
- X-seq: zsh-workers 44417
- From: joão marcos pereira bezerra <marcospb19@xxxxxxxxxxx>
- To: "zsh-workers@xxxxxxx" <zsh-workers@xxxxxxx>
- Subject: Issue with string slices
- Date: Mon, 17 Jun 2019 08:36:58 +0000
- Accept-language: pt-BR, en-US
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotmail.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=lZGYhGqdWVK+Non4JBLczYwr33VElmWn+cYLSKDnFk8=; b=fgnXru9t/LIIRmlIZnFfnlImp9PgrUTaSAycE/JcVGpz95IVg+4Zvz37v4FByMFdr44quZVSOP2Uz0Cm/F5jfvHlIjKDFiRwJTF0p0q/WakaKkiMNHEeVjX0JrsI+eD+A9SVDDBvIfQLjPLGsCZh+8F7qP5q7n31LQkwQo2JQtP7mH4JfAsWDnVk2NRZ4NIZNJrMQ22sPNyVlyvMykOffEQPG3a5SI50spoUHH9M9coZoy5jPI6Pl1WZOmsYuvsuRPlnSlhrX42PwquZUovZbbhQcvJE9kz7N4j3ZJAuAKEd8jaQqsu0aEvXO3rhTNEIANWLOYpjMd/E3ol3rChk/A==
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- Thread-index: AQHVJOctA4YdyJJj3EWmYYnou426XQ==
- Thread-topic: Issue with string slices
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author