Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

-d negative index not working #47

Open
amerlyq opened this issue Aug 21, 2016 · 2 comments
Open

-d negative index not working #47

amerlyq opened this issue Aug 21, 2016 · 2 comments

Comments

@amerlyq
Copy link

amerlyq commented Aug 21, 2016

In man for -d we have Negative array indexes will wrap around.
Trying $ echo '[1,2,3]' | jshon -d -1

[
 1,
 2,
 3
]

Did I misinterpreted man?

@jmetzmeier
Copy link

This appears to work if it wraps around to the first element, but that's not very useful:

$ echo '[1,2,3]' | jshon -d -3
[
 2,
 3
]

@amerlyq
Copy link
Author

amerlyq commented Aug 23, 2016

Yes, it's not useful at all -- I have different structure in last element
and must drop it before applying -a to rest. Without negative indexes it's
relatively cumbersome task. I hope there is way to fix it at least.

On Tue, Aug 23, 2016, 02:04 Jordan Metzmeier notifications@github.com
wrote:

This appears to work if it wraps around to the first element, but that's
not very useful:

$ echo '[1,2,3]' | jshon -d -3
[
2,
3
]


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#47 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AFdvMOW1xa8s0zcpzjqkj0-xnsA96TMyks5qiisBgaJpZM4JpTXo
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants