Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: print built-in doesn't print this.



On Sun, Nov 14, 2021 at 8:21 PM jdh <dhenman@xxxxxxxxx> wrote:
>
> I wanted to insert a string of '-'s to visually show a change in a list.
> But  I found out that
>
>      print "--------"

This should do it:

    print -- "--------"

It's unfortunate that print doesn't report an error with the original
arguments. UNIX utilities usually do:

BSD:

    % ls --------
    ls: unrecognized option `--------'
    usage: ls [snip]

GNU:

    % ls --------
    ls: unrecognized option `--------'
    Try 'ls --help' for more information.

Roman.




Messages sorted by: Reverse Date, Date, Thread, Author