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

easy



When we do this:

    $ test () {  echo @[2,-1]; }
    $ test one two three four five
     two three four five

... why is it that the leading number works intuitively but the second one
is 'off by one' so to speak?  Nothing is removed from the end of the array
so one might expect " [2,-0] ".  I don't doubt there's a good reason but
what is it?  How should I think the syntax?



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