zsh-users
 help / color / mirror / code / Atom feed
* Why the l parameter flag in this case not work?
@ 2012-03-20  8:32 lilydjwg
  2012-03-20  8:57 ` Damien Thébault
  0 siblings, 1 reply; 3+ messages in thread
From: lilydjwg @ 2012-03-20  8:32 UTC (permalink / raw)
  To: zsh-users

I tried to print a line of `-' but not work:

print ${(l.80..-.)}

An empty line is printed. However, printing a line of `=' or other
strings do work:

print ${(l.80..+.)}

I tried to quote `-', but only 40 `-'s are printed:

print ${(l.80..\-.)}

My zsh is version 4.3.17.

-- 
Best regards,
lilydjwg


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Why the l parameter flag in this case not work?
  2012-03-20  8:32 Why the l parameter flag in this case not work? lilydjwg
@ 2012-03-20  8:57 ` Damien Thébault
  2012-03-20 13:41   ` lilydjwg
  0 siblings, 1 reply; 3+ messages in thread
From: Damien Thébault @ 2012-03-20  8:57 UTC (permalink / raw)
  To: zsh-users

On Tue, Mar 20, 2012 at 09:32, lilydjwg <lilydjwg@gmail.com> wrote:
> I tried to print a line of `-' but not work:
>
> print ${(l.80..-.)}
>
> An empty line is printed. However, printing a line of `=' or other
> strings do work:
>
> print ${(l.80..+.)}
>
> I tried to quote `-', but only 40 `-'s are printed:
>
> print ${(l.80..\-.)}
>

The "print" command is intepreting the expanded expression as an
argument, you can use "echo" or use "--" to tell the "print" command
that the end of arguments has been reached:

echo ${(l.80..-.)}
print -- ${(l.80..-.)}

Regards,
-- 
Damien Thebault


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Why the l parameter flag in this case not work?
  2012-03-20  8:57 ` Damien Thébault
@ 2012-03-20 13:41   ` lilydjwg
  0 siblings, 0 replies; 3+ messages in thread
From: lilydjwg @ 2012-03-20 13:41 UTC (permalink / raw)
  To: zsh-users

On Tue, Mar 20, 2012 at 09:57:08AM +0100, Damien Thébault wrote:
> On Tue, Mar 20, 2012 at 09:32, lilydjwg <lilydjwg@gmail.com> wrote:
> > I tried to print a line of `-' but not work:
> >
> > print ${(l.80..-.)}
> >
> > An empty line is printed. However, printing a line of `=' or other
> > strings do work:
> >
> > print ${(l.80..+.)}
> >
> > I tried to quote `-', but only 40 `-'s are printed:
> >
> > print ${(l.80..\-.)}
> >
> 
> The "print" command is intepreting the expanded expression as an
> argument, you can use "echo" or use "--" to tell the "print" command
> that the end of arguments has been reached:
> 
> echo ${(l.80..-.)}
> print -- ${(l.80..-.)}

Thanks!

-- 
Best regards,
lilydjwg


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-03-20 13:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-20  8:32 Why the l parameter flag in this case not work? lilydjwg
2012-03-20  8:57 ` Damien Thébault
2012-03-20 13:41   ` lilydjwg

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).