Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: print built-in doesn't print this.
- X-seq: zsh-users 27341
- From: Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
- To: jdh <dhenman@xxxxxxxxx>, zsh-users@xxxxxxx
- Subject: Re: print built-in doesn't print this.
- Date: Sun, 14 Nov 2021 19:29:24 +0000
- Archived-at: <https://zsh.org/users/27341>
- In-reply-to: <20211114111957.4514@sachi>
- List-id: <zsh-users.zsh.org>
- References: <20211114111957.4514@sachi>
On Sun, 2021-11-14 at 11:19 -0800, jdh wrote:
> I wanted to insert a string of '-'s to visually show a change in a list.
> But I found out that
>
> print "--------"
>
> Does not print anything out. Well maybe a \n.
> Is this intentional? Or a well known feature?
print has standard option syntax, so you need to terminate
lists of options (even if they're empty) with "--".
print -- "--------"
The echo builtin is non-standard and doesn't have this
requirement, but it's non-standard in a different way in
different shells, so I'd recommend getting used to using
print like that.
pws
Messages sorted by:
Reverse Date,
Date,
Thread,
Author